D-Man <dsh8290 at rit.edu> wrote in comp.lang.python: > On Wed, Apr 18, 2001 at 03:26:12AM -0400, Mike C. Fletcher wrote: > | 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. > > Umm, I might be missing something but I think the following does that > : > > > def my_func( an_arg ) : > do_something( an_arg ) > > > If it is called with the absence of a value, an error will be raised > by the interpreter, otherwise it is passed an object (possibly None). His function should also work when no argument was given. Except it should do something special then. -- Remco Gerlich
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