On Thu, Jun 14, 2012 at 9:06 AM, R. David Murray <rdmur...@bitdance.com> wrote: > I don't have strong feelings about this, but to me the fact that there > are values of the individual parameters that if they occur on the same > object at the same time would be invalid is a code smell. If the thing > can be one and only one of a list of possible types, it makes sense to > me that this be indicated as a single attribute with a list of possible > values, rather than a set of boolean options, one for each type. > > For the attribute error issue, we could have module attributes that give > names to the strings: > > if parameter.kind == inspect.VARARG_KIND: > stuff > > Or if we don't want that in the stdlib, the individual programmer who > cares about it can define their own constants.
On Thu, Jun 14, 2012 at 11:10 AM, Brett Cannon <br...@python.org> wrote: > I agree with Benjamin, it goes against TOOWTDI without enough of a > justification to break the rule. Just make the strings constants on the > Parameter class and you solve the lack of enum issue. +1 -eric _______________________________________________ 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