[issue35168] shlex punctuation_chars inconsistency

Vinay Sajip report at bugs.python.org
Mon Nov 5 14:45:07 EST 2018


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

I agree that it's inconsistent, but quite a bit of setting up is done when punctuation_chars is provided, as per the link in msg329312. One could convert the attribute to a property and have a setter that does the equivalent set up, but some of the setup is one-time (removing things from wordchars, etc.), and would require additional work to handle the case where the property is reassigned multiple times. I have no problem updating the documentation to indicate in a note that it must be provided in the constructor and not later, but apart from the fact that it's inconsistent, is there a use case for supporting setting it later? That would mean setting it up so that you could set it several times, unset it, etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35168>
_______________________________________


More information about the Python-bugs-list mailing list