Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

From: Ville Vainio (ville_at_spammers.com)
Date: 03/30/05


Date: 30 Mar 2005 09:53:24 +0300


>>>>> "Steven" == Steven Bethard <steven.bethard@gmail.com> writes:

    Steven> to be documented as a builtin type. I don't find the
    Steven> argument "builtin type methods are hard to find"
    Steven> convincing -- the solution here is to fix the
    Steven> documentation, not refuse to add builtin types.

Yep - that's why we should perhaps fix the documentation first :-).

    Steven> I guess the real questions are[1]:
    Steven> * How much does iter feel like a type?

Guess this depends on the person. I've never thought of it as a
type. It's too fundamental a concept to coerce into a type, even
thought protocol == type in a sense.

    Steven> [1] There's also the question of how much you believe in
    Steven> OO tenets like "functions closely associated with a type
    Steven> should be members of that type"...

The issue that really bothers me here is bloating the builtin
space. We already have an uncomfortable amount of builtin
functions. Of course the additions that have been suggested would not
pollute the builtin namespace, but they would still be there, taking
space. I'd rather see a more modular and 'slimmer' Python, what with
the advent of Python for S60 and other embedded uses.

Perhaps what you need is 'from usefulstuff import *', with usefulstuff
having os, sys, 'itertools as it', &c.

-- 
Ville Vainio   http://tinyurl.com/2prnb


Relevant Pages

  • Thoughts about Python
    ... learning Python. ... In order to create a static method we have to use a the builtin ... There is no need for the builtin... ... "Throwing away" this builtins would flatten the alreay flat learning ...
    (comp.lang.python)
  • Re: xml.doms weirdness?
    ... I run python as: ... After those imports is the standard Python traceback (because of the ... # installing zipimport hook ... import zipimport # builtin ...
    (comp.lang.python)
  • Re: Why no warnings when re-assigning builtin names?
    ... whether or not Python should issue a warning in the ... I think any Python n00b should be writing code in n editor that is ... py> import keyword ... builtin -> coerce ...
    (comp.lang.python)
  • Re: bad marshal data in site.py in fresh 2.5 install win
    ... I am now on a different computer, one that has never heard of Python, ... import zipimport # builtin ... import _codecs # builtin ... import sys, encodings, encodings.aliases ...
    (comp.lang.python)
  • Re: Why are there no ordered dictionaries?
    ... ordered dictionaries are not needed when Python ... > 2.4 has the 'sorted' builtin. ... What does sortedhave anythng to do with orders like insertion order, ...
    (comp.lang.python)