[Python-Dev] Other library updates

2005-02-06 Thread Raymond Hettinger
Any objections to replacing the likes of types.IntType and types.ListType with int and list? Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/optio

RE: [Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Skip Montanaro
Raymond> [Skip] >> If lists are conceptually like vectors or arrays in other languages >> and tuples are like C structs or Pascal records, then by converting >> from list to tuple form you've somehow muddied the data structure >> water just to take advantage of tuples' immutabi

[Python-Dev] RE: [Python-checkins] python/dist/src/Lib/test test_copy.py, 1.11.8.1, 1.11.8.2

2005-02-06 Thread Raymond Hettinger
> Modified Files: > Tag: release23-maint > test_copy.py > Log Message: > fix bug 1114776 Don't forget release24-maint. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscrib

RE: [Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Raymond Hettinger
[Neal] > I think I implemented this once. I'll try to see if I can find a > patch. It wasn't too difficult, but I'm not sure if the patch was > clean. If the opportunity arises, another worthwhile peepholer buildout would be to recognize if-elif chains that can be transformed to a single lookup

RE: [Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Raymond Hettinger
[Skip] > If lists are conceptually like vectors or > arrays > in other languages and tuples are like C structs or Pascal records, then > by > converting from list to tuple form you've somehow muddied the data > structure > water just to take advantage of tuples' immutability. In the context of lit

Re: [Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Neal Norwitz
On Sun, 6 Feb 2005 10:49:05 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > Wouldn't it be better to have the peephole optimizer recognize the throwaway > nature of lists in these contexts: > > for elt in [1, 2, 4, 8, 16]: > ... > > if foo in [list, tuple]: > ... >

Re: [Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Guido van Rossum
On Sun, 6 Feb 2005 10:49:05 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > In a python-checkins message, Raymond stated: > > Raymond> Replace list of constants with tuples of constants. > > I understand the motivation here (the peephole optimizer can convert a tuple > of constants into

[Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Skip Montanaro
In a python-checkins message, Raymond stated: Raymond> Replace list of constants with tuples of constants. I understand the motivation here (the peephole optimizer can convert a tuple of constants into a single constant that need not be constructed over and over), but is the effort worth the

Re: [Python-Dev] 2.3.5 and 2.4.1 release plans

2005-02-06 Thread Tim Peters
[Anthony Baxter] >> Ok, so here's the state of play: 2.3.5 is currently aimed for next >> Tuesday, but there's an outstanding issue - the new copy code appears >> to have broken something, see www.python.org/sf/1114776 for the gory >> details. ... [Alex Martelli] > The problem boils down to: deepc

Re: [Python-Dev] 2.3.5 and 2.4.1 release plans

2005-02-06 Thread Alex Martelli
On 2005 Feb 06, at 08:34, Tim Peters wrote: ... The easy fix: instead of cls.__mro__ use inspect.getmro which deals with that specifically. ... Since the original bug report came from Zopeland, chances are good (although the report is too vague to be sure) that the problem involves ExtensionC