Re: [Python-Dev] unscriptable?
-On [20080420 03:04], Nick Coghlan ([EMAIL PROTECTED]) wrote: >To suggest yet another colour for the bikeshed, maybe we should ditch >both unindexable and unsubscriptable and go with "'int' is not a >sequence or mapping". Any object which supports subscript notation will >be one or the other. Sounds even clearer to me. +1 -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B It is necessary to be noble, and yet take humility as a basis. It is necessary to be exalted, and yet take modesty as a foundation... ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 3k checkin mails to python-checkins
> Since a few days, checkin notifications for the 3k branch seem to be sent > to both the python-checkins and the python-3000-checkins lists. Was that a > deliberate decision or has some bug crept into the SVN hook? It's a bug, I'll look into it (when I find the time). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] A smarter shutil.copytree ?
I have submitted a patch for review here: http://bugs.python.org/issue2663 glob-style patterns or a callable (for complex cases) can be provided to filter out files or directories. Regards Tarek ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] A smarter shutil.copytree ?
On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé <[EMAIL PROTECTED]> wrote: > I have submitted a patch for review here: http://bugs.python.org/issue2663 > > glob-style patterns or a callable (for complex cases) can be provided > to filter out files or directories. I'm not a big fan of the sequence-or-callable argument. Why not just make it a callable argument, and supply a utility function so that you can write something like:: exclude_func = shutil.excluding_patterns('*.tmp', 'test_dir2') shutil.copytree(src_dir, dst_dir, exclude=exclude_func) ? Steve -- I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] A smarter shutil.copytree ?
On Sun, 20 Apr 2008, Steven Bethard wrote: On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé <[EMAIL PROTECTED]> wrote: I have submitted a patch for review here: http://bugs.python.org/issue2663 glob-style patterns or a callable (for complex cases) can be provided to filter out files or directories. I'm not a big fan of the sequence-or-callable argument. Why not just make it a callable argument, and supply a utility function so that you can write something like:: exclude_func = shutil.excluding_patterns('*.tmp', 'test_dir2') shutil.copytree(src_dir, dst_dir, exclude=exclude_func) Even if a glob pattern filter is considered useful enough to be worth special-casing, the glob capability should also be exposed via something like your excluding_patterns constructor and additionally as a function that can be called by another function intended for use as a callable argument. If it is not, then doing something like "files matching these glob patterns except for those matching this non-glob-expressible condition and also those files matching this second non-glob-expressible condition" becomes painful because the glob part essentially needs to be re-implemented. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] unscriptable?
On Sat, Apr 19, 2008 at 6:03 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > To suggest yet another colour for the bikeshed, maybe we should ditch > both unindexable and unsubscriptable and go with "'int' is not a > sequence or mapping". Any object which supports subscript notation will > be one or the other. I wouldn't bet my life on that. __getitem__ overloading for all sorts of nefarious purposes has quite a following. I'd prefer a message that doesn't get into what x "is" but sticks to the point at hand, which is that it doesn't support __getitem__. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com