Python Iterables struggling using map() built-in

Ian Kelly ian.g.kelly at gmail.com
Thu Dec 11 18:57:29 EST 2014


On Thu, Dec 11, 2014 at 4:28 PM, Steven D'Aprano <
steve+comp.lang.python at pearwood.info> wrote:
>
> Ian Kelly wrote:
>
> > A function, on the
> > other hand, is not well suited to be a namespace, because it's not
> > expected to provide one.
>
>
> And that is exactly the point I am making about the inherent
> conservativeness of Python developers.
>
> Functions ARE namespaces, like instances of user-defined classes they
have a
> __dict__ and can carry per-instance state. (If you think that only modules
> are namespaces, you are badly mistaken. Instances are namespaces too.)

I never said that functions can't be used as namespaces. I said that
functions are *bad* namespaces, and I gave reasons why I think this is true.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141211/29d8ee7d/attachment.html>


More information about the Python-list mailing list