[Python-ideas] Definition Symmetry
Ben Finney
ben+python at benfinney.id.au
Fri Feb 1 05:28:33 CET 2013
Jason Keene <jasonkeene at gmail.com> writes:
> In a way they do the same thing, they both create an object
> (function/class) from a suite and assign it to the name given after the
> keyword (def/class). Sure they do totally different things with the suite
> in creating the object, but in essence it's a name assignment.
In a way, ‘import’ and ‘break’ do the same thing, they trigger the
compiler to compile a particular set of code bytes. Sure the code bytes
do totally different things, but in essence it's a statement.
Less facetiously: You can blur your vision as much as you like to make
‘class’ and ‘def’ look similar, but that doesn't diminish the importance
of the distinctions you're ignoring.
--
\ “Always do right. This will gratify some people, and astonish |
`\ the rest.” —Mark Twain |
_o__) |
Ben Finney
More information about the Python-ideas
mailing list