[Jeremy Hylton] > Funny you should pick this example! I have been struggling > with a collection of C code where the author used an > UNLESS() macro. I find it obscures the program logic > significantly. Python's own cPickle.c uses an UNLESS macro 135 times. That doesn't mean it doesn't also use "if (! ...)", and indeed there's no predicting when it may get used. It makes cPickle.c hard to work with too. Python gets a lot of mileage out of reducing the number of "preference ways" to spell things: you spell a thing the way Guido likes to spell it, and everyone's happy <wink>. OTOH, there are cases like lock.acquire() try: do stuff finally: lock.release() that get really tedious if you need to do them a lot, and especially if you need to nest them. Maybe Guido can introduce a canned "withlock" macro just for that <ahem>: withlock lock: do stuff
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4