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/2000-July/006185.html below:

[Python-Dev] File Object Copy

[Python-Dev] File Object Copy [Python-Dev] File Object CopyMoshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Wed, 12 Jul 2000 10:21:08 +0300 (IDT)
On Wed, 12 Jul 2000, Peter Funk wrote:

> 'shutil.copyfile' however takes filenames as arguments and contains
> the loop sketched above as inline code.  I see two possibilities:
>   1. It would be easy to skip the open and close operations in 
>      'shutil.copyfile', if either 'src' or 'dst' are already open 
>      file objects instead of strings.  

-0: Too much Perl-like DWIM magic

>   2. Or you factor out the copy loop operation above and rename it into 
>      'copycontent' or 'copybytes' or whatever.

Of course it should be factored out: but the question remains, why shell
utils? Do you really think copybytes belongs there?
--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez




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