[issue14731] Enhance Policy framework in preparation for adding email6 policies as provisional
R. David Murray
report at bugs.python.org
Sun May 20 22:18:51 CEST 2012
R. David Murray <rdmurray at bitdance.com> added the comment:
I checked the indent fix into the wrong branch in my repo. It's in the other patch. I could fix that if desired.
The reason for making the base class public is to allow subclassing. Perhaps that is not needed for Compat32, though.
I don't think that the policy argument obsoletes the existing method options. It is easier to write:
gen.flatten(msg, linesep='\r\n')
than it is to write
gen.flatten(msg, policy=msg.policy.clone(linesep='\r\n'))
That is, when you want to make a change in just one method call, as opposed to globally, then the existing arguments are more convenient.
That said, a section in What's New describing when it might be a good idea to move to a global policy setting vs using the existing arguments may be worthwhile.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14731>
_______________________________________
More information about the Python-bugs-list
mailing list