This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients Lucretiel, yselivanov
Date 2015-06-05.19:20:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433532056.19.0.589560956529.issue23653@psf.upfronthosting.co.za>
In-reply-to
Content
Nathan, consider the following signature:

  def foo(a=0:''): pass

now, sig.parameters['a'].annotation will be '' and .default will be 0, and they will fail 'if param.annotation or param.default' check.  That's why we encourage checks like 'if param.annotation is not param.empty'.

Closing this issue.
History
Date User Action Args
2015-06-05 19:20:56yselivanovsetrecipients: + yselivanov, Lucretiel
2015-06-05 19:20:56yselivanovsetmessageid: <1433532056.19.0.589560956529.issue23653@psf.upfronthosting.co.za>
2015-06-05 19:20:56yselivanovlinkissue23653 messages
2015-06-05 19:20:55yselivanovcreate