PEP 3100 still isn't clear on the fate of these guys, except that
reduce() is gone.
How about moving all three to the functools module instead?
-j
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Un
On 6/1/07, Jason Orendorff <[EMAIL PROTECTED]> wrote:
> PEP 3100 still isn't clear on the fate of these guys, except that
> reduce() is gone.
>
> How about moving all three to the functools module instead?
The itertools module already has imap() and ifilter(). They can just
be renamed to map() and
"Jason Orendorff" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| PEP 3100 still isn't clear on the fate of these guys, except that
| reduce() is gone.
|
| How about moving all three to the functools module instead?
The current reduce is broken due to being a mashing together of tw
> I agree that that looks nice in my editor, but it is not Unicode-
> conforming practice, and I suspect that if you experiment with any
> printer you'll discover that you get an empty line at the top of the
> page.
This seems to me to be a non-issue; most "text" files are actually
data files (thi
> The *only* thing that adoption of the Unicode recommendation for line
> breaking changes is that "\x0c\n" is now two empty lines with well-
> defined semantics instead of some number of lines with you-won't-know-
> until-you-ask-the-implementation semantics.
Well, that's just the way text is.
>
On 6/1/07, Jason Orendorff <[EMAIL PROTECTED]> wrote:
> PEP 3100 still isn't clear on the fate of these guys, except that
> reduce() is gone.
I'm not sure what isn't clear: reduce() is listed as "to be removed",
and since map() and filter() aren't mentioned as "to be removed",
they're presumably n
Terry Reedy schrieb:
> "Jason Orendorff" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | PEP 3100 still isn't clear on the fate of these guys, except that
> | reduce() is gone.
> |
> | How about moving all three to the functools module instead?
>
> The current reduce is broken d
In PEP 3115 (the new metaclasses PEP), there is an example metaclass:
# The metaclass
class OrderedClass(type):
# The prepare function
@classmethod
def __prepare__(metacls, name, bases): # No keywords in this case
return member_table()
On 6/1/07, Collin Winter <[EMAIL PROTECTED]> wrote:
> On 6/1/07, Jason Orendorff <[EMAIL PROTECTED]> wrote:
> > PEP 3100 still isn't clear on the fate of these guys, except that
> > reduce() is gone.
>
> I'm not sure what isn't clear: reduce() is listed as "to be removed",
> and since map() and fil
"Georg Brandl" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| How should an "ireduce" work? The result is not a sequence which could be
| returned lazily.
It would generate the sequence of partial reductions (potentially
indefinately).
list(ireduce(summer, 0, range(5)) = [0, 1, 3
Hi,
I was doing some testing on the new _string_io module, since I was
slightly skeptical on my handling of wide Unicode characters (32-bit
of length, instead of the usual 16-bit in UTF-16). So, I ran this
little test:
>>> s = _string_io.StringIO()
>>> s.write(u'晉')
>>> s.tell()
2
Li
"Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I was doing some testing on the new _string_io module, since I was
> slightly skeptical on my handling of wide Unicode characters (32-bit
> of length, instead of the usual 16-bit in UTF-16). So, I ran this
> little test:
>
>>>> s =
I see no benefit in ireduce(), just more ways to write obfuscated code.
Regarding map() and filter(), I don't see what's unclear about PEP 3100:
"""
* Make built-ins return an iterator where appropriate (e.g. ``range()``,
``zip()``, ``map()``, ``filter()``, etc.) [zip and range: done]
"""
--Gu
You're right. Fixed now. I also fixed dict.setitem (should be
dict.__setitem__). Thanks for noticing!
--Guido
On 6/2/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
> In PEP 3115 (the new metaclasses PEP), there is an example metaclass:
>
> # The metaclass
> class OrderedClass(type):
>
>
What he said. IOW, we're treating each half of a surrogate as a
"character", at least for purposes of counting items in a string.
(Otherwise operations like len() and indexing/slicing would no longer
be O(1).)
--Guido
On 6/2/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> "Alexandre Vassalotti"
Thanks for explanation. Anyway, it certainly much simpler to deal with
surrogate pairs than with variable-width characters.
On 6/1/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> "Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I was doing some testing on the new _string_io modu
Stephen J. Turnbull wrote:
> Both FF and VT *are* whitespace, AFAIK that has universal
> agreement, and in particular they *are* removed by string.strip().
You're right, strip() wasn't a good example, and I
withdraw it.
However, there's a big difference between being a
whitespace character and be
Terry Reedy wrote:
> It would generate the sequence of partial reductions (potentially
> indefinately).
> list(ireduce(summer, 0, range(5)) = [0, 1, 3, 6, 10]
>
> This is obviously *not* the same as a reduce() which only returns the final
> value without the intermediate values.
It's sufficient
"Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote:
> Thanks for explanation. Anyway, it certainly much simpler to deal with
> surrogate pairs than with variable-width characters.
I don't know, I really liked my tree overlay that could handle
variable-width characters of any internal encoding (utf-
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<07Jun1.111434pdt."
On 5/27/07, Stephen J. Turnbull <[EMAIL PROTECTED]> wrote:
>James Y Knight writes:
>> a 'pyidchar.txt' file with a list of character ranges, and now that
>> pyidchar.txt file is going to have separate sections based on module
>> name? Sorry, but are you [EMAIL PROTECTED] kidding me?!?
>
>The scalab
On 6/2/07, Rauli Ruohonen <[EMAIL PROTECTED]> wrote:
> (1) Add a mandatory ASCII-only special comment at the beginning of
> each module. The comment would continue until the first empty
> line and would contain only valid directives matching some
> regular expression. Only whitespace is
22 matches
Mail list logo