Martin v. Löwis wrote: > The simplest solution to achieve the rationale of the PEP would be > to add a function operator.nop. Of course, writing > > def nop(*args):pass > > isn't that more difficult than writing > > from operator import nop Although the def version above has problems with keyword arguments. Still, I'd be +0 on def nop(*args, **kwds): pass in the operator module, in the spirit of TOOWTDI. And I meant to add a resounding 'Aye!' to Tim's comment about the debugging value of None not being callable - that's an obvious indicator of 'I screwed up', whereas silently returning None as proposed in the PEP may trigger the error report an arbitrary distance from the original mistake. Cheers, Nick. -- Nick Coghlan | Brisbane, Australia Email: ncoghlan at email.com | Mobile: +61 409 573 268
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