You want this kind of construct when creating "generic services" that can process any object type (including None), so need to be able to determine whether the object passed is, in fact, the value None, or merely the absence of a value. Anyway, not a huge issue one way or another. Enjoy, Mike -----Original Message----- From: Steve Purcell [mailto:stephen_purcell at yahoo.com] Sent: Wednesday, April 18, 2001 03:03 To: Delaney, Timothy Cc: Python List (E-mail) Subject: Re: Idiom gone, or did it really ever exist? () is () Delaney, Timothy wrote: ... Agreed. I'm just saying that this *is* the convention, not that replacing the magic tuple values with None will work without further changes. Given def foo(bar=None): ... I think it's reasonable that foo() and foo(None) do the same thing. Why prevent people from explicitly calling your function in the default way? ...
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