On Dec 10, 2010, at 6:20 AM, Éric Araujo wrote: > Final note: with 3.2 being in beta, I don’t know how much can be changed > now.
Part of the purpose of a beta, and in our case, two betas is to give people a chance to exercise new APIs and fix them before they become set in stone two months later. IMO, sysconfig did not warrant a whole module. The pile of awkward accessor functions is harder to learn / remember than the simple data structure shown in the last email. Rather than using two levels of dictionary, it's also possible to use a named tuple if you think that is more clean looking: >>> c = sys.sysconfig() >>> c.config_vars.get('SO) '.pyd' >>> c.platform 'win32' >>> c.paths.get('stdlib') 'C:\\Python32\\Lib' >>> # the named tuple fields: >>> c.fields ['config_vars', 'platform', 'version', 'scheme_names', 'paths'] This would be a straight-forward API that uses existing, well-known tools (attribute access and dict.get) instead of an unnecessary nest of ad-hoc accessor functions living in a new module. Tastes may vary on writing getter functions for every category of interest but we did not need a whole new module for this. The referenced email didn't indicate much if any thought about the API design, so I think should get that thought now. If those functions were already public in distutils, it is trivial to write an adapter for them there. Raymond
_______________________________________________ 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