Well, you could have a variable f that points at a memory address, such that

>>> def x():
...  return
...
>>> x
<function x at 0xb7d5a304>
>>> x=0
>>> x
0
>>>

but I don't really understand why/what you're trying to do

2008/3/21, Martin Manns <[EMAIL PROTECTED]>:
>
> Hi,
>
> Is there a way to create a function that is equal to 0?
> I try to redefine __cmp__ but I am pretty stuck.
>
> Something like:
>
> >>> def f(): return ""
> ...
> >>> # Some magic
> >>> f == 0
> True
>
> Thanks in advance
>
> Martin
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to