Eduardo Robles Elvira added the comment:

> I cannot yet go into the details, because I have not tested the patch.

> The comments, docstrings and quoting are not very consistent with the rest of 
> the module. There are a few spelling mistakes. 

I can try to take care of this, though it'd be best if you can point me out 
concrete examples.

> The open_volume() method is more or less a copy of the open() method which is 
> not optimal.

I know, but trying to do something else might be even worse..

> The patch adds a lot of complexity to the tarfile module for a use case that 
> only a few connoisseurs benefit from. It seems to alter some inherent TarFile 
> mechanics that people might rely on, e.g. the members attribute contains only 
> the members stored in the current volume not the overall entirety of members. 

Well, that doesn't make much sense to me. You say that people rely on something 
like  "members attribute contains only the members stored in the current volume 
not the overall entirety of members", but as you know, python tarfile lib 
didn't support volumes before this patch, so I guess people couldn't be relying 
on that anyway.

Also please bear in mind that tarfile volumes support is part of the tar 
standard, and altough not everyone uses this, it has its niche uses (sliced 
backups etc).

> Does this patch reliably allow random-access?

Yes and no. 

No: when you open a volume for reading, the list of members is cleared as you 
pointed so you cannot access to them.

Yes: you can open any volume at the begining of a file, and it read the tarfile 
from there. I do that in my use-case.

> Would it be possible/easier to add the same functionality using a separate 
> class MultiVolumeTarFile instead?

If you find open_volume similar to open() and don't like, I'm quite sure you 
would like all the needed copy-paste having this a separate class would entail. 
Also as I said before, might not make much sense as this is part of the 
standard.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18321>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to