Message274257
| Author |
Kay.Hayen |
| Recipients |
Kay.Hayen |
| Date |
2016年09月02日.16:45:37 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1472834737.57.0.822205168917.issue27942@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Consider this:
def defaultKeepsIdentity(arg = "str_value"):
print(arg is "str_value")
defaultKeepsIdentity()
This has been outputing "True" on every Python release I have seen so far, but not so on 3.6.0a4. Normally string values come from a "co_const" and will be "is" identical if used as literals in a module, but no longer in this case.
This seems wasteful at best, needlessly increasing the number of strings in usage.
Yours,
Kay |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年09月02日 16:45:37 | Kay.Hayen | set | recipients:
+ Kay.Hayen |
| 2016年09月02日 16:45:37 | Kay.Hayen | set | messageid: <1472834737.57.0.822205168917.issue27942@psf.upfronthosting.co.za> |
| 2016年09月02日 16:45:37 | Kay.Hayen | link | issue27942 messages |
| 2016年09月02日 16:45:37 | Kay.Hayen | create |
|