[Distutils] PEP 376 comments

Kevin Teague kevin at bud.ca
Tue Jun 9 00:07:33 CEST 2009

Glancing over the EggInfo, EggInfoDirectories, and EggInfoDirectory
APIs, it might be interesting if these were able to match with the PEP
3119 interfaces (http://www.python.org/dev/peps/pep-3119/).

For example, the EggInfoDirectories has __iter__, append, clear and
remove methods, but the source code comments list them as 'container
APIs'. Technically though, that's an Iterable interface and a partial
implementation of the MutableSequence interface.

The EggInfoDirectories.get_egg_infos(project_name) is also suggestive
of the Mapping interface - if this method was shortened from
get_egg_infos() to just get().

Maybe it would be confusing if an EggInfoDirectories was a
MutableSequence which could only have paths added to it, but returned
an iterable of EggInfoDirectory, but could also be accessed as a
Mapping where the keys are project names and those values are
EggInfos ... but maybe something along those lines would work?

More information about the Distutils-SIG mailing list