Ian Kelly wrote:
On Thu, Jun 16, 2011 at 10:24 PM, Erik Max Francis <m...@alcyone.com> wrote:
True. So let's use `in` to represent breaking out of the top-level code of
a module. Why not, it's not the first time a keyword has been reused,
right?
The point is, if it's not obvious already from that facetious proposal, it's
not a good idea to reuse keywords that really read very differently than
their original use. Reusing `break` (or `return`) this way would be rather
abusive.
Yes, using `in` to mean "break out of a block" would obviously be a
terrible choice, since the word "in" has nothing to do with breaking.
I really don't see why using `break` to mean "break out of a block" is
counter-intuitive, especially since as you point out it is already
used that way for two particular types of blocks. The proposed usage
merely adds a third type.
I think a stronger objection might be that it disrupts the homology of
`break` and `continue`, since continuing a module is meaningless.
Yes, which could be rephrased as the fact that `break` and `continue`
are restricted to looping control structures, so reusing `break` in this
context would be a bad idea. You know, kind of like the exact point I
made earlier which you're trying to nitpick in another reply.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Maybe I could see you / When this is over
-- Scritti Politti
--
http://mail.python.org/mailman/listinfo/python-list