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/120444.html below:

[Python-Dev] pep 362 - 5th edition

[Python-Dev] pep 362 - 5th editionYury Selivanov yselivanov.ml at gmail.com
Wed Jun 20 04:36:58 CEST 2012
On 2012-06-19, at 9:22 PM, Yury Selivanov wrote:
> On 2012-06-19, at 8:39 PM, Nick Coghlan wrote:
>> 7. The idea of immutable Signature objects does highlight an annoyance
>> with the "attribute may be missing" style APIs. To actually duplicate
>> a signature correctly, including its return annotation (and assuming
>> the attribute is renamed), you would have to do something like:
>> 
>>   try:
>>       note = {"annotation": old_sig.annotation}
>>   except AttributeError:
>>       note = {}
>>   new_sig = Signature(old_sig.parameters[1:], **note)

BTW, we don't have slices for OrderedDict.  Since the slice object is
not hashable, we can implement it safely.  I can create an issue (and draft
implementation), as I think it'd be quite a useful feature.

-
Yury

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