Message279014
| Author |
eryksun |
| Recipients |
eryksun, ezio.melotti, mingrammer, vstinner |
| Date |
2016年10月20日.04:33:01 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1476937981.48.0.817404399577.issue28481@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Interning of strings is an implementation detail for the efficient storage of variable and attribute names. A string with ':' in it cannot be a variable or attribute name and thus is not interned. But you don't need to know which strings are interned or why they're interned because correct Python code should never compare strings by identity. Use an equality comparison, e.g. (var2 == ':bb'). Generally identity comparisons are of limited use in Python, such as checking for a singleton object such as None. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年10月20日 04:33:01 | eryksun | set | recipients:
+ eryksun, vstinner, ezio.melotti, mingrammer |
| 2016年10月20日 04:33:01 | eryksun | set | messageid: <1476937981.48.0.817404399577.issue28481@psf.upfronthosting.co.za> |
| 2016年10月20日 04:33:01 | eryksun | link | issue28481 messages |
| 2016年10月20日 04:33:01 | eryksun | create |
|