Ordered Sets
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sat Mar 28 03:33:55 EDT 2009
En Thu, 26 Mar 2009 12:20:17 -0300, Scott David Daniels
<Scott.Daniels at acm.org> escribió:
> (2) Why, oh why, do people feel so comforted adding double_underscores
> to data structures? If I want to inherit from your mapping in order
> to log the attempts to discard a key not actually in the set, I
> have to either us the nasty name mangling to get at self.__map, or
> name my subclass OrderedSet and take advantage of a not-guaranteed
> name mangling. What on earth makes you unwilling to go with "_map"
> and credit your code's consumers with a bit of common sense?
>
> Sorry, this latter rant has been building up for a while (spurred on by
> a sojourn into the unittest code where they have the private disease in
> spades.
My commiserations.
--
Gabriel Genellina
More information about the Python-list
mailing list