Pythoncal, anyone? (My (late) beef with Simple Generator syn tax (PEP 255))

sismex01 at hebmex.com sismex01 at hebmex.com
Mon Nov 18 10:15:51 EST 2002


> From: Greg Ewing [mailto:see_reply_address at something.invalid]
> Sent: Sunday, November 17, 2002 8:27 PM
> 
> I have an idea: Suppose there were a "don't"
> statement that could be put in front of another
> statement to, effectively, comment it out,
> e.g.
> 
>   def foo():
>     # This function does nothing
>     don't print "Hello"
> 
> Then an empty generator could be written
> 
>   def g():
>     don't yield None
> 
> Now, since this isn't going to do anything,
> it should be permissible to omit any expressions
> that would otherwise be required in a statement
> covered by a "don't", leaving just
> 
>   def g():
>     don't yield
>

Yeah, and let's create a "mesh" operator, and a "worm",
and "rabbit-ears", and "wax-wane", and ... :-)

Been reading too much intercal, eh? ;-)

-gustavo




More information about the Python-list mailing list