Re: [Python-Dev] PEP 246 - concrete assistance to developers of new adapter classes

2005-01-21 Thread Alex Martelli
On 2005 Jan 21, at 14:02, Nick Coghlan wrote: Phillip's monkey-typing PEP (and his goal of making it easy to write well behaved adapters) got me wondering about the benefits of providing an adaptation. Adapter class that could be used to reduce the boiler plate required when developing new adapt

Re: [Python-Dev] Unix line endings required for PyRun* breaking embedded Python

2005-01-21 Thread Bob Ippolito
On Jan 21, 2005, at 7:44, Jack Jansen wrote: On 21 Jan 2005, at 08:18, Stuart Bishop wrote: Just van Rossum wrote: Skip Montanaro wrote: Just re.sub("[\r\n]+", "\n", s) and I think you're good to go. I don't think that in general you want to fold multiple empty lines into one. This would be my pre

[Python-Dev] PEP 246 - concrete assistance to developers of new adapter classes

2005-01-21 Thread Nick Coghlan
Phillip's monkey-typing PEP (and his goal of making it easy to write well behaved adapters) got me wondering about the benefits of providing an adaptation. Adapter class that could be used to reduce the boiler plate required when developing new adapters. Inheriting from it wouldn't be *required*

Re: [Python-Dev] Unix line endings required for PyRun* breaking embedded Python

2005-01-21 Thread Jack Jansen
On 21 Jan 2005, at 08:18, Stuart Bishop wrote: Just van Rossum wrote: Skip Montanaro wrote: Just re.sub("[\r\n]+", "\n", s) and I think you're good to go. I don't think that in general you want to fold multiple empty lines into one. This would be my prefered regex: s = re.sub(r"\r\n?", "\n", s

Re: [Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-21 Thread Michael Hudson
Donovan Baarda <[EMAIL PROTECTED]> writes: > On Thu, 2005-01-20 at 14:12 +, Michael Hudson wrote: >> Donovan Baarda <[EMAIL PROTECTED]> writes: >> >> > On Wed, 2005-01-19 at 13:37 +, Michael Hudson wrote: >> >> Donovan Baarda <[EMAIL PROTECTED]> writes: > [...] >> >> The main oddness abou

Re: [Python-Dev] Updated Monkey Typing pre-PEP

2005-01-21 Thread Jack Jansen
On 20 Jan 2005, at 12:07, Guido van Rossum wrote: The first problem is what I'd call incomplete duck typing. Confit de canard-typing? -- Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman __

Re: [Python-Dev] __str__ vs. __unicode__

2005-01-21 Thread Walter Dörwald
M.-A. Lemburg wrote: > [...] __str__ and __unicode__ as well as the other hooks were specifically added for the type constructors to use. However, these were added at a time where sub-classing of types was not possible, so it's time now to reconsider whether this functionality should be extended to