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 | chester |
|---|---|
| Recipients | chester |
| Date | 2008年05月11日.13:16:14 |
| SpamBayes Score | 0.12913503 |
| Marked as misclassified | No |
| Message-id | <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
To create a tuple with one element, you need to do this: >>> my_tuple = (1,) # Note the trailing comma after the value 1 >>> type(my_tuple) <type 'tuple'> But if you do this >>> my_tuple = (1) >>> type(my_tuple) <type 'int'> you don't get a tuple. I thought that just putting a value inside ( ) would make a tuple. Apparently that is not the case. I hate ugly code so it would be clean if Python would convert anything put into ( ) to be a tuple, even if just one value was put in (without having to use that ugly looking comma with no value after it). |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年05月11日 13:16:17 | chester | set | spambayes_score: 0.129135 -> 0.12913503 recipients: + chester |
| 2008年05月11日 13:16:17 | chester | set | spambayes_score: 0.129135 -> 0.129135 messageid: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> |
| 2008年05月11日 13:16:15 | chester | link | issue2817 messages |
| 2008年05月11日 13:16:14 | chester | create | |