Closed acsor closed 5 years ago
I introduced this modification in Remove redundant @Property accessors from PdfFileReader
. . Before I close this issue we can eventually discuss the change.
"isEncrypted" is better style than "getIsEncrypted" in any realistic sense.
Cameron Laird, vice president We make computers work for people.
On Fri, Oct 5, 2018 at 5:13 PM Oscar notifications@github.com wrote:
I introduced this modification in Remove redundant @Property accessors from PdfFileReader. https://github.com/claird/PyPDF4/commit/f020613e99b05ab982acca04519428fd645efbf7. Before I close this issue we can eventually discuss the change.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/claird/PyPDF4/issues/19#issuecomment-427512769, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbN9AGkOQ3pliFWehw883YkIVmTp2iyks5uh9mDgaJpZM4W0Mxr .
Yeah, definitely. Also, the past getIsEncrypted()
code was so minimal that I was left wondering why no one did like so in the first place :'-).
PdfFileReader
has about9
cases of the following pattern. Take as a concrete exampleisEncrypted
:I do not see any real utility in this code style and it actually causes more verbosity. I invite to change these many cases were
getProperty() == property
to something like (takeisEncrypted
as an example again):Please note that
isEncrypted
's docstring seems misleading. Indeed, I know of no default caching for property decorators, as attested here.