[Python-3000] Library Change Request: change functools.partial.keywords to kwargs

2008-02-19 Thread hashcollision
I have a library change request: currently partial Objects created by functools.partial has the "keywords" attribute. However, the standard name for something like it is kwargs. I request that it be renamed to "kwargs". http://docs.python.org/lib/partial-objects.html __

[Python-3000] Rename re.sub and re.subn

2008-01-27 Thread hashcollision
I have always thought that re's sub and subn are misnamed. I always mis-remember them as 'replace'. Can they either be renamed to "replace" and "replacen" or at least the new functions added? ___ Python-3000 mailing list Python-3000@python.org http://mail

[Python-3000] PEP 3116 question

2008-01-09 Thread hashcollision
>From PEP 3116: "BufferedRandom implementation is for all random-access objects, whether they are read-only, write-only, or *read-write*." (emphasis mine) However, from the pseudo-code for open(), "if reading + writing + appending > 1: raise ValueError("can't have read/write/append mode at once

[Python-3000] What does the "+" mode do?

2008-01-08 Thread hashcollision
A quick question: What does the "+" mode do? I couldn't find much on google (except that it is called "updating"). ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org

Re: [Python-3000] Need closure on __cmp__ removal

2008-01-08 Thread hashcollision
+1 from me too if you only need to define __lt__ and __eq__ and __le__ and __gt__, etc, will default to that. If it dosn't default to those, I feel that one would need to write too many functions. On Jan 8, 2008 7:12 PM, Steven Bethard <[EMAIL PROTECTED]> wrote: > On Jan 8, 2008 3:55 PM, Brett Ca

Re: [Python-3000] Need closure on __cmp__ removal

2008-01-08 Thread hashcollision
Ok, I do see your point, but how would one pass in a custom comparison function to sorted? On Jan 7, 2008 11:55 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Jan 7, 2008 8:48 PM, hashcollision <[EMAIL PROTECTED]> wrote: > > > > > > > But the bigges

Re: [Python-3000] Need closure on __cmp__ removal

2008-01-07 Thread hashcollision
> > But the biggest thing missing is precise semantics. Saying "exactly > the same semantics as with Python 2.5" doesn't cut it (those semantics > are incredibly hairy and sometimes surprising, and their > implementation was a nightmare -- I've rarely been as relieved as when > I was able to cut th

[Python-3000] Default factory that uses key

2008-01-06 Thread hashcollision
The default factory that collections.defaultdict takes cannot use key. Is there a way to have the default factory take the key into consideration? For example d = collections.defaultdict(lambda title: BookShelf(title)) If not, I propose that it be added. _

[Python-3000] Request for prod()

2008-01-06 Thread hashcollision
I request the addition of prod(): def prod(seq): s = 1 for x in seq: s *= x prod is always as useful as sum() ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http:/

Re: [Python-3000] Need closure on __cmp__ removal

2008-01-06 Thread hashcollision
David A. Wheeler has already written a draft PEP, which can be found here: http://www.dwheeler.com/misc/pep-cmp.txt. ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.o

[Python-3000] XOR and NOT operator syntax

2007-12-22 Thread hashcollision
Currently, True or False works as expected, but True xor False is invalid. I don't see a reason why and, or, not are valid python keywords but xor is not. Can this be added in python 3.0 for completeness? Also, True & False, True | False, True ^ Fals, True != False works but !True, !False dosn't.

[Python-3000] API changes?

2007-12-21 Thread hashcollision
I have a few questions. 1) Where can I suggest API changes? 2) Are there any plans to add more modules in python 3000 either in python 3.0 or later? ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 U

[Python-3000] Why lowercase?

2007-12-13 Thread hashcollision
I don't think there is any chance that this will change in python 3000 but... Why is the builtin types lowercase when the convention is for classes to be in CamelCase? For example, frozenset versus UserDict. Was there any reason that this is the way it is or is it just a "wart"? ___

[Python-3000] Possible Duck Typing Problem in Python 2.5?

2007-12-09 Thread hashcollision
>From http://ivory.idyll.org/blog/dec-07/conversions.html: class X: internal = [5,6,7,8] def __getitem__(self, i): return self.internal[i] x = X() l = [1,2,3] print l + x fails with TypeError: can only concatenate list (not "instance") to list I tried: class X(list): interna

[Python-3000] renaming suggestion

2007-07-31 Thread hashcollision
I think that WeakKeyDictionary and should be renamed to WeakKeyDict (same with WeakValueDictionary). This will make it consistent with dict and collections.defaultdict. Sincerely ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/