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 taleinat
Recipients barry, gregory.p.smith, larry, ncoghlan, rhettinger, serhiy.storchaka, taleinat, zach.ware
Date 2015-05-09.09:01:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1431162110.7.0.575546717646.issue24145@psf.upfronthosting.co.za>
In-reply-to
Content
Well, the main reasons I'm +1 on the "|=" feature (regardless of specific syntax) are:

1) the intent is much clearer: e.g. also accept None, nothing else special going on
2) much easier maintenance if the default set of accepted types ever changes

Also, this is one of the cases where I think that DRY defeats "explicit is better than implicit". As another example, in some hypothetical code, if there was a module constant "DEFAULT_FLAGS = A | B | C", I would prefer later to use "flags = DEFAULT_FLAGS | D" rather than "flags = A | B | C | D".
History
Date User Action Args
2015-05-09 09:01:50taleinatsetrecipients: + taleinat, barry, rhettinger, gregory.p.smith, ncoghlan, larry, zach.ware, serhiy.storchaka
2015-05-09 09:01:50taleinatsetmessageid: <1431162110.7.0.575546717646.issue24145@psf.upfronthosting.co.za>
2015-05-09 09:01:50taleinatlinkissue24145 messages
2015-05-09 09:01:50taleinatcreate