Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typos #1

Merged
merged 2 commits into from
Jul 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions advanced_python/advanced_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ class Card(object):
def __lt__(self, other):
return self._order.index(self.rank) < self._order.index(other.rank)

def __eq(self, other):
def __eq__(self, other):
return self.rank == other.rank

ace_of_spades = Card('A', 'spades')
Expand Down Expand Up @@ -789,7 +789,7 @@ class CachedObject(object):
return CACHE[instance.key][self.name]

def __set__(self, instance, value):
CACHE.get[instance.key][self.name] = value
CACHE[instance.key][self.name] = value


class Toaster(object):
Expand Down Expand Up @@ -1033,4 +1033,4 @@ with redis_client.pipeline() as pipe:

* Python docs, [The `with` statement](http://docs.python.org/3.4/reference/compound_stmts.html#with)
* Python docs, [Context Manager Types](http://docs.python.org/3.4/library/stdtypes.html#context-manager-types)
* Python docs, [`contextlib`](http://docs.python.org/3.4/library/contextlib.html)
* Python docs, [`contextlib`](http://docs.python.org/3.4/library/contextlib.html)