Help me cythonize a python routine!

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Nov 10 02:40:27 EST 2016


On Thursday 10 November 2016 18:23, Andrea D'Amore wrote:

> On 10 November 2016 at 00:15, Steve D'Aprano <steve+python at pearwood.info>
> wrote:
>> py> import collections
> […]
>> py> import os
>> py> os.listdir('/usr/local/lib/python3.5/collections/')
> 
> Not
> 
>     os.listdir(collections.__path__[0])
> 
> since it's already there?


I was working in the interactive interpreter, and it was easier and more 
convenient to copy the path from a previous line's output, than to type a new 
expression.



-- 
Steven
299792.458 km/s — not just a good idea, it’s the law!




More information about the Python-list mailing list