Re: [Python-3000] TextIOWrapper.write(s:str) and bytes in py3k-struni

2007-07-17 Thread Paul Moore
On 17/07/07, Christian Heimes <[EMAIL PROTECTED]> wrote: >def write(self, s: str): >if self.closed: >raise ValueError("write to closed file") >if not hasattr(s, 'encode') >raise TypeError("str expected, got %r" % s) >... > > ? It explains what is

Re: [Python-3000] TextIOWrapper.write(s:str) and bytes in py3k-struni

2007-07-17 Thread Nick Coghlan
Christian Heimes wrote: > What do you think about > > def write(self, s: str): > if self.closed: > raise ValueError("write to closed file") > try: > b = s.encode(self._encoding) > except AttributeError: > raise TypeError("str expected

Re: [Python-3000] Heaptypes

2007-07-17 Thread Guido van Rossum
Thanks! Can you add test_pickle to the wiki page? (http://wiki.python.org/moin/Py3kStrUniTests) On 7/16/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Guido van Rossum schrieb: > > That sounds like a good idea to try. It may break some more tests but > > those are all indications of places tha

Re: [Python-3000] Heaptypes

2007-07-17 Thread Martin v. Löwis
Guido van Rossum schrieb: > Thanks! Can you add test_pickle to the wiki page? > (http://wiki.python.org/moin/Py3kStrUniTests) Done! Martin ___ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscrib

Re: [Python-3000] Heaptypes

2007-07-17 Thread Guido van Rossum
On 7/17/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Guido van Rossum schrieb: > > Thanks! Can you add test_pickle to the wiki page? > > (http://wiki.python.org/moin/Py3kStrUniTests) > > Done! But now I'm confused. I don't see the failure. Are you sure you checked in what you did? In the py3

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Guido van Rossum
On 7/13/07, Michele Simionato <[EMAIL PROTECTED]> wrote: > Phillip J. Eby telecommunity.com> writes: > > For what it's worth, the pkgutil > > module already contains an even simpler generic function > > implementation than simplegeneric, and is already in the stdlib > > albeit undocumented. > > We

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Phillip J. Eby
At 02:47 PM 7/17/2007 -0700, Guido van Rossum wrote: >I have one remaining question for Phillip: why is your design >"absolutely dependent on being able to modify functions in-place"? >That dependency would appear to make it harder to port the design to >other Python implementations whose function

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Guido van Rossum
On 7/17/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 02:47 PM 7/17/2007 -0700, Guido van Rossum wrote: > >I have one remaining question for Phillip: why is your design > >"absolutely dependent on being able to modify functions in-place"? > >That dependency would appear to make it harder to po

[Python-3000] Introspection broken for objects using Py_FindMethod()

2007-07-17 Thread Alexandre Vassalotti
Hi, It is intentional that the introspection broken for objects using Py_FindMethod()? For example: Python 3.0x (cpy_merge:56413:56414M, Jul 17 2007, 13:57:23) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>> import cPickle >>> dir(cPickle.Unpickler(file)) [] >>> dir(cPickle.Pi

Re: [Python-3000] Introspection broken for objects using Py_FindMethod()

2007-07-17 Thread Guido van Rossum
On 7/17/07, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > Hi, > > It is intentional that the introspection broken for objects using > Py_FindMethod()? For example: > >Python 3.0x (cpy_merge:56413:56414M, Jul 17 2007, 13:57:23) >[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>>> impo

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Phillip J. Eby
At 03:53 PM 7/17/2007 -0700, Guido van Rossum wrote: >On 7/17/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > > At 02:47 PM 7/17/2007 -0700, Guido van Rossum wrote: > > >I have one remaining question for Phillip: why is your design > > >"absolutely dependent on being able to modify functions in-pla

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Jim Jewett
On 7/17/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 02:47 PM 7/17/2007 -0700, Guido van Rossum wrote: > >I have one remaining question for Phillip: why is your design > >"absolutely dependent on being able to modify functions in-place"? > It allows the framework to bootstrap via successive

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Greg Ewing
Phillip J. Eby wrote: > It allows the framework to bootstrap via successive > approximation. Initially, the 'implies()' function is just a plain > function, and then it later becomes a generic function. (And of > course it gets called in between those two points.) The same happens > for 'dis

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Phillip J. Eby
At 09:04 PM 7/17/2007 -0400, Jim Jewett wrote: >On 7/17/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > > At 02:47 PM 7/17/2007 -0700, Guido van Rossum wrote: > > >I have one remaining question for Phillip: why is your design > > >"absolutely dependent on being able to modify functions in-place"? >

Re: [Python-3000] pep 3124 plans

2007-07-17 Thread Phillip J. Eby
At 01:37 PM 7/18/2007 +1200, Greg Ewing wrote: >Phillip J. Eby wrote: > > It allows the framework to bootstrap via successive > > approximation. Initially, the 'implies()' function is just a plain > > function, and then it later becomes a generic function. (And of > > course it gets called in bet

Re: [Python-3000] Heaptypes

2007-07-17 Thread Martin v. Löwis
> But now I'm confused. I don't see the failure. Are you sure you > checked in what you did? In the py3k-struni branch? Oops, no. The commit was rejected because it was not whitespace-normalized correctly, and I didn't notice. Now I tried again. Martin ___

[Python-3000] Py3k_struni additional test failures under cygwin

2007-07-17 Thread Joe Smith
Building Py3k_struni under Cygwin I've noticed a few more tests failing than the wiki shows. These are using SVN revision 56413. Some spurious errors seem to occur if Python/ is not remaned temporally. I have not included those. (This is an oddity of the cygwin '.exe' autohandling combined with

Re: [Python-3000] Invalid \U escape in source code give hard-to-trace error

2007-07-17 Thread Martin v. Löwis
> When a source file contains a string literal with an out-of-range \U > escape (e.g. "\U12345678"), instead of a syntax error pointing to the > offending literal, I get this, without any indication of the file or > line: > > UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in > positi

Re: [Python-3000] exclusion feature for 2to3?

2007-07-17 Thread Martin v. Löwis
> BTW I hope to see more core developers from Europe at EuroPython next year! It's always difficult to get there for me, as it takes place during the semester :-( Regards, Martin ___ Python-3000 mailing list [email protected] http://mail.python.or

Re: [Python-3000] Invalid \U escape in source code give hard-to-trace error

2007-07-17 Thread Kurt B. Kaiser
"Guido van Rossum" <[EMAIL PROTECTED]> writes: > When a source file contains a string literal with an out-of-range \U > escape (e.g. "\U12345678"), instead of a syntax error pointing to the > offending literal, I get this, without any indication of the file or > line: > > UnicodeDecodeError: 'unic

Re: [Python-3000] Invalid \U escape in source code give hard-to-trace error

2007-07-17 Thread Kurt B. Kaiser
"Guido van Rossum" <[EMAIL PROTECTED]> writes: > When a source file contains a string literal with an out-of-range \U > escape (e.g. "\U12345678"), instead of a syntax error pointing to the > offending literal, I get this, without any indication of the file or > line: > > UnicodeDecodeError: 'unic