On Mon, Mar 2, 2009 at 3:43 PM, Raymond Hettinger <pyt...@rcn.com> wrote: > [GvR] >> >> *Maybe* the "built-in status" should guide the >> capitalization, so only built-in types are lowercase (str, int, dict >> etc.). > > That makes sense. > > >> Anyway, it seems the collections module in particular is already >> internally inconsistent -- NamedTuple vs. defaultdict. > > FWIW, namedtuple() is a factory function that creates a class, it isn't > a class itself. There are no instances of namedtuple(). Most functions > are all lowercase. Don't know if that applies to factory functions too.
This is unfortunately ambiguous; e.g. threading.Lock() is a factory function too. Anyways, I was mistaken about this example; I should have pointed to Counter and the UserXxx classes in collections.py. On Mon, Mar 2, 2009 at 3:44 PM, Armin Ronacher <armin.ronac...@active- > I suppose you mean "DefaultDict". Yes, I've been distracted. :-( > That would actually be the best solution. > Then the module would be consistent and the new ordered dict version would go > by > the name "OrderedDict". OK. > PS.: so is datetime.datetime a builtin then? :) Another historic accident. Like socket.socket. :-( -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com