A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-November/136925.html below:

[Python-Dev] Improvements for Pathlib

[Python-Dev] Improvements for Pathlib [Python-Dev] Improvements for PathlibIonel Cristian Mărieș contact at ionelmc.ro
Sat Nov 8 20:02:23 CET 2014
On Saturday, November 8, 2014, Xavier Morel <python-dev at masklinn.net> wrote:

>
>
> Why would pathlib need to provide this when tempfile already does?
>
>   with tempfile.NamedTemporaryFile(prefix='') as f:
>       tmp = pathlib.Path(f.name)
>
>   with tempfile.TemporaryDirectoryDirectory(prefix='') as d:
>       tmp = pathlib.Path(d.name)
>
> For the same reason pathlib provides path manipulation functionality while
os.path already does: a cohesive and more convenient api. In other words, I
want to have less calls and variables around (less room for errors, less
visual bloat), and this is such a common pattern it's worth supporting it
in pathlib.



-- 

Thanks,
-- Ionel M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20141108/30593dfd/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4