Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.063 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.01; 'subject:Python': 0.06; 'badly': 0.09; 'function,': 0.09; 'subject:using': 0.09; 'python': 0.11; 'namespace,': 0.16; 'user-defined': 0.16; 'wrote:': 0.18; 'thu,': 0.19; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'developers.': 0.31; 'steven': 0.31; "can't": 0.35; 'classes': 0.35; 'received:google.com': 0.35; 'instances': 0.36; 'expected': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'ian': 0.60; 'making': 0.63; 'provide': 0.64; 'inherent': 0.84; 'hand,': 0.93; 'suited': 0.93; 'state.': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ggexDeou0xpaikwbB6r9JqmOabru+W+OSlMIAagMxCc=; b=wqmOUZBGr3kp4k66W9R/+hT10OwL9ZHGi8pBrN14o0ulduxsB9zAYb7wFNanrka1Dp tf9G8njQCXbSHORuHdZ9G2A4Q1t9Pd+pKiG26pl/gRW+XCAnsQ91zP8ZXgEn2MUpyne0 5o6pU7/sWJkbxb1AZdih9p/Ye9AOTtxpqkMAJmElsfLnX0+t6NFI/4YZRnM39Ui/UV7E /6tGLTJd+5R1kDkwj+3ll7ohHAbRhVf1ybNaUgDEQx7mBxiNqIQ2kE5YaRD4ilFGC0ii Q0z0YdTi0HZFEUAL0PNQFecrQ9TBytwS5sUNYoX57u3LlfJokgfFHGMwVjTn269Xvp1x Z8RQ== X-Received: by 10.70.91.142 with SMTP id ce14mr21840904pdb.138.1418342290195; Thu, 11 Dec 2014 15:58:10 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <548a28b4$0$13001$c3e8da3$5496439d@news.astraweb.com> References: <004e01d01173$e1641c10$a42c5430$@gmail.com> <5484e3d8$0$13013$c3e8da3$5496439d@news.astraweb.com> <54866372$0$12991$c3e8da3$5496439d@news.astraweb.com> <54878f8a$0$13010$c3e8da3$5496439d@news.astraweb.com> <54881159$0$2817$c3e8da3$76491128@news.astraweb.com> <54891733$0$2817$c3e8da3$76491128@news.astraweb.com> <548a28b4$0$13001$c3e8da3$5496439d@news.astraweb.com> From: Ian Kelly Date: Thu, 11 Dec 2014 16:57:29 -0700 Subject: Re: Python Iterables struggling using map() built-in To: Python Content-Type: multipart/alternative; boundary=001a11c2141e608e210509f98c4a X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418342293 news.xs4all.nl 2962 [2001:888:2000:d::a6]:59419 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82397 --001a11c2141e608e210509f98c4a Content-Type: text/plain; charset=UTF-8 On Thu, Dec 11, 2014 at 4:28 PM, Steven D'Aprano < steve+comp.lang.python@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. --001a11c2141e608e210509f98c4a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Dec 11, 2014 at 4:28 PM, Steven D'Aprano <<= a href=3D"mailto:steve%2Bcomp.lang.python@pearwood.info">steve+comp.lang.py= thon@pearwood.info> wrote:
>
> Ian Kelly wrote:
><= br>> > A function, on the
> > other hand, is not well suited= to be a namespace, because it's not
> > expected to provide o= ne.
>
>
> 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 hav= e a
> __dict__ and can carry per-instance state. (If you think that o= nly modules
> are namespaces, you are badly mistaken. Instances are n= amespaces 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.

--001a11c2141e608e210509f98c4a--