Can a function access its own name?

Mike Meyer mwm at mired.org
Sun Nov 20 05:30:32 CET 2005


bobueland at yahoo.com writes:
> Thanks Diez and Peter,
> Just what I was looking for. In "Library Reference" heading
> 3.11.1 Types and members
> Running this yields the result
>
>     cap(s, n)

You've now got three solutions. They'll work fine most of the time,
but can't be trusted in general. Binding a name to a function doesn't
change the name that these solutions return, and the name they return
may no longer be bound to said function. Just a warning.

    <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list