homepage

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 r.david.murray
Recipients barry, lpolzer, r.david.murray
Date 2013年11月25日.17:13:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385399618.14.0.463605289914.issue19678@psf.upfronthosting.co.za>
In-reply-to
Content
I think this is reasonable. A patch would be welcome.
You could use inspect. When I had to do something similar I just did the call inside a try/except, caught TypeError and retried without the extra argument. See the __init__ of email.feedparser.FeedParser. I don't know which approach is better; although, with the new signature support in 3.4 perhaps inspecting the signature is better.
Another approach would be to designate a new method name for the new signature, and use hasattr to decide which to call. That's actually a bit more consistent with the way the SMTPChannel works.
History
Date User Action Args
2013年11月25日 17:13:38r.david.murraysetrecipients: + r.david.murray, barry, lpolzer
2013年11月25日 17:13:38r.david.murraysetmessageid: <1385399618.14.0.463605289914.issue19678@psf.upfronthosting.co.za>
2013年11月25日 17:13:38r.david.murraylinkissue19678 messages
2013年11月25日 17:13:37r.david.murraycreate

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