Message183332
| Author |
alex |
| Recipients |
alex |
| Date |
2013年03月02日.17:23:39 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1362245019.42.0.972918137955.issue17338@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Following the length_hint PEP, we should expose this facility to end-python programmers. The semantics would be basically: the list has behavior identical to if you hadn't provided length_hint, except the VM is free to preallocate efficiently.
CPython (and PyPy) use this kind of logic internally all over the place when lists are to be returned (including, but not limited to, list() with a single argument!)
If this is considered to be a good idea I'll whip up a patch. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年03月02日 17:23:39 | alex | set | recipients:
+ alex |
| 2013年03月02日 17:23:39 | alex | set | messageid: <1362245019.42.0.972918137955.issue17338@psf.upfronthosting.co.za> |
| 2013年03月02日 17:23:39 | alex | link | issue17338 messages |
| 2013年03月02日 17:23:39 | alex | create |
|