[Python-Dev] PEP 362 Third Revision

Alexandre Zani alexandre.zani at gmail.com
Thu Jun 14 19:13:26 CEST 2012


+1
On Thu, Jun 14, 2012 at 9:16 AM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
> On 2012年06月14日, at 11:24 AM, Brett Cannon wrote:
>> On Thu, Jun 14, 2012 at 9:50 AM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
>>>> [SNIP]
>>>> Let's consider replacement of 'Parameter.is_*' set of attributes with
>> a single 'Parameter.kind' attribute, which will have the following
>> possible values: 'positional', 'vararg', 'keyword-only', 'varkwarg'.
>>>> (I think 'positional' is more intuitive than 'index'?)
>>>>>> +1 if this change is made.
>> How about adding 'kind' and keeping 'is_*' attributes,
> but making them read-only dynamic properties, i.e.:
>>   class Parameter:
>       ...
>>       @property
>       def is_vararg(self):
>           return self.kind == 'vararg'
>>       ...
>> ?
>> Thanks,
> -
> Yury
>> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/alexandre.zani%40gmail.com


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /