Last active
August 29, 2015 14:20
-
-
Save bascht/03015a781dc794bfea3c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [3] pry(main)> def foo(bar, baz=bar); baz; end | |
| => :foo | |
| [4] pry(main)> foo("oha") | |
| => "oha" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> def foo(bar, baz=bar): | |
| ... pass | |
| ... | |
| Traceback (most recent call last): | |
| File "<stdin>", line 1, in <module> | |
| NameError: name 'bar' is not defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment