Re: [Python-Dev] Mini-Pep: An Empty String ABC

2008-06-01 Thread Antoine Pitrou
Raymond Hettinger rcn.com> writes: > Also, starting with Py3.0, strings are > essentially abstract sequences of code points, meaning that an encode() method > is essential to being able to usefully transform them back into concrete data. Well, that depends: - is a String the specification of a ge

Re: [Python-Dev] Alternative to more ABCs [was:] Iterable String Redux (aka String ABC)

2008-06-01 Thread Paul Moore
2008/6/1 Guido van Rossum <[EMAIL PROTECTED]>: >> The case for String has already been made. > > Actually I'm not sure. One you know that isinstance(x, String) is > true, what can you assume you can do with x? [...] > Right. I'm now beginning to wonder what exactly you're after here -- > saying tha

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-06-01 Thread Paul Moore
2008/5/31 r. m. oudkerk <[EMAIL PROTECTED]>: > I am certainly open to using lowercase/lower_case_with_underscores for > all functions/methods except for Process's methods and possibly > currentProcess(), but I would like some feed back on that. I dislike mixedCase, but consistency with the rest of

Re: [Python-Dev] Iterable String Redux (aka String ABC)

2008-06-01 Thread Greg Ewing
Armin Ronacher wrote: basestring is not subclassable for example. Also it requires subclassing which ABCs do not. The use case that was cited was recognising subclasses of UserString, and that's what I was responding to. If basestring were made subclassable and UserString inherited from it, t

Re: [Python-Dev] Mini-Pep: Simplifying the Integral ABC

2008-06-01 Thread Fredrik Johansson
On Sun, Jun 1, 2008 at 8:15 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Discussion > -- > The only known use cases for variants of int are types that limit the range > of > values to those that fit in a fixed storage width. Add: * Faster big integers (gmpy) * Integers with exact div

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-06-01 Thread Nick Coghlan
Paul Moore wrote: Wasn't there some talk of changing modules to use PEP 8 conventions (lowercase_with_underscore) as part of the Python 3.0 conversion? Did that ever happen? We fixed the module names that used mixed case - the amount of work that turned out to be involved in just doing that mu

Re: [Python-Dev] Mini-Pep: Simplifying the Integral ABC

2008-06-01 Thread Aahz
On Sat, May 31, 2008, Raymond Hettinger wrote: > > Proposal > > Remove non-essential abstract methods like __index__, three argument > __pow__, __lshift__, __rlshift__, __rshift__, __rrshift__, __and__, > __rand__, __xor__, __rxor__, __or__, __ror__, and __invert__, > numerator, and denomi

Re: [Python-Dev] [Python-3000] Finishing up PEP 3108

2008-06-01 Thread Georg Brandl
Mark Dickinson schrieb: On Sat, May 31, 2008 at 11:33 AM, Georg Brandl <[EMAIL PROTECTED] > wrote: Now that the docs are reST, the source is almost pretty enough to display it raw, but I could also imagine a "text" writer that removes the more obscure

Re: [Python-Dev] [Python-3000] Finishing up PEP 3108

2008-06-01 Thread Martin v. Löwis
> The module is currently ~ 400 kb in size. If this is deemed to be a > problem, > we could use zlib to compress the contents -- which of course is bad for > systems without the zlib module (are there any?). In the distribution, the file gets compressed, anyway. In the installation, I don't think

Re: [Python-Dev] Iterable String Redux (aka String ABC)

2008-06-01 Thread Guido van Rossum
On Sun, Jun 1, 2008 at 3:54 AM, Greg Ewing <[EMAIL PROTECTED]> wrote: > The use case that was cited was recognising subclasses of > UserString, and that's what I was responding to. If > basestring were made subclassable and UserString inherited > from it, that use case would be covered. UserString

Re: [Python-Dev] [Python-3000] Finishing up PEP 3108

2008-06-01 Thread Quentin Gallet-Gilles
I've uploaded a patch for the aifc module (http://bugs.python.org/issue2847). I'm still working on the testsuite. Comments are welcome! Quentin On Thu, May 29, 2008 at 5:39 PM, Quentin Gallet-Gilles <[EMAIL PROTECTED]> wrote: > > On Thu, May 29, 2008 at 4:56 PM, Lars Immisch <[EMAIL PROTECTED]>

Re: [Python-Dev] Alternative to more ABCs [was:] Iterable String Redux (aka String ABC)

2008-06-01 Thread Guido van Rossum
On Sun, Jun 1, 2008 at 6:57 AM, Paul Moore <[EMAIL PROTECTED]> wrote: > 2008/6/1 Guido van Rossum <[EMAIL PROTECTED]>: >>> The case for String has already been made. >> >> Actually I'm not sure. One you know that isinstance(x, String) is >> true, what can you assume you can do with x? > [...] >> Ri

Re: [Python-Dev] Mini-Pep: An Empty String ABC

2008-06-01 Thread Guido van Rossum
This PEP is incomplete without specifying exactly which built-in and stdlib types should be registered as String instances. I'm also confused -- the motivation seems mostly "so that you can skip iterating over it when flattening a nested sequence" but earlier you rejected my "Atomic" proposal, say

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-06-01 Thread Gregory P. Smith
On Fri, May 30, 2008 at 1:37 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2008-05-30 00:57, Nick Coghlan wrote: >> >> M.-A. Lemburg wrote: >>> >>> * Why can't we have both PyString *and* PyBytes exposed in 2.x, >>> with one redirecting to the other ? >> >> We do have that - the PyString_* name

Re: [Python-Dev] Iterable String Redux (aka String ABC)

2008-06-01 Thread Greg Ewing
Guido van Rossum wrote: There are quite a few core APIs that accept no substitutes, and being an instance of basestring was intended to guarantee that a value is accepted by such APIs. In that case, the idea of a user-defined string class that doesn't inherit from str or unicode seems to be a l