Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

There are two issues here.

The simple one is building a large format string for struct.unpack(). It has 
simple solution: use f'>{n}{_BINARY_FORMAT[size]}'.

The hard issue is that read(n) allocates n bytes in memory even if there are 
not so many bytes in the file. It affects not only plistlib and should be fixed 
in the file implementation itself. There is an open issue for this.

----------

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

Reply via email to