A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-June/120244.html below:

[Python-Dev] PEP 362 Third Revision

[Python-Dev] PEP 362 Third RevisionEric Snow ericsnowcurrently at gmail.com
Thu Jun 14 20:23:37 CEST 2012
On Thu, Jun 14, 2012 at 9:06 AM, R. David Murray <rdmurray at 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 <brett at 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4