creating class objects inside methods
horos11 at gmail.com
Sun Oct 4 08:14:08 CEST 2009
Thanks for the info, but a couple of points:
1. it wasn't meant to be production code, simply a way to teach
2. this should either be a compile time or a runtime error.
'Actions at a distance' like this are deadly both to productivity and
to correctness - not only is this a runtime error, it is a *silent*
runtime error. Any other language I know would catch this, whether it
be lua, java, or perl.
Saying that 'whoa, this coding error should be handled by naming
convention' may be the only practical way of getting around this
limitation, but it is a limitation nonetheless, and a pretty big one.
More information about the Python-list