File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ Common Gotchas
22==============
33
44For the most part, Python aims to be a clean and consistent language that
5- avoids surprises, but there are a few cases where newcomers to the language
6- often get tripped up .
5+ avoids surprises. However, there are a few cases that can be confusing to
6+ newcomers .
77
8- Some of these are intentional but potentially surprising. Some could arguably
9- be considered language warts. In general though, what follows is a collection
8+ Some of these cases are intentional but can be potentially surprising. Some
9+ could arguably be considered language warts. In general though, what follows is a collection
1010of potentially tricky behavior that might seem strange at first glance, but is
1111generally sensible once you're aware of the underlying cause for the surprise.
1212
@@ -157,7 +157,7 @@ What You Should Do Instead
157157~~~~~~~~~~~~~~~~~~~~~~~~~~
158158
159159The most general solution is arguably a bit of a hack. Due to Python's
160- afformentioned behavior concerning evaluating default arguments to functions
160+ aforementioned behavior concerning evaluating default arguments to functions
161161(see :ref: `default_args `), you can create a closure that binds immediately to
162162its arguments by using a default arg like so:
163163
You can’t perform that action at this time.
0 commit comments