Closed f0r3n51c6uy closed 3 years ago
This must be a windows issue. I have python 3.8.5 and it seems fine (on macOS). When I get in front of a windows machine I can debug a bit more. Can you reproduce this issue using the linux subsystem?
I perform some test on different Windows 10 computers with PowerShell as Shell and Python 3.8.5 installed and I can't reproduce the error. In the initial issue I forget to mention that the strange behavior occurs in the Python IDE PyCharm (Community Edition) Version 2020.2.1. I tested the Version 2019.2.1 and the error doesn't occur.
After this testing I conclude that the error is created by the PyCharm IDE and not by the pypher package. If you agree with me we can close this Issue.
Have a nice day Dominic
Thanks for the bug report.
PyCharm must be doing something with object inspection that causes a .len
call to be added to the chain. I wonder if it is possible to reproduce by simply defining a __len__
method on a class and having it print something to stdout.
I could see PyCharm's devs having the assumption that len()
would not produce any side effects, I bet not many implementations of it does
I've tried to construct the example from the README.md in the Python Console and observed some strange prefix and suffix when converting the pypher object to a string. It seems that multiple .
len
terms are appended as prefix and suffix.When executing the example instruction in a python script everything works as expected.
system information: