Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate output when op() argument wasn't an object. #78

Closed
CokeStudios opened this issue Aug 27, 2022 · 2 comments
Closed

Duplicate output when op() argument wasn't an object. #78

CokeStudios opened this issue Aug 27, 2022 · 2 comments

Comments

@CokeStudios
Copy link

import hashlib
op(hashlib)
<module 'hashlib' from 'C:\Users\guojoan\AppData\Local\Programs\Python\Python310\lib\hashlib.py'>
<module 'hashlib' from 'C:\Users\guojoan\AppData\Local\Programs\Python\Python310\lib\hashlib.py'>

a = []
a.append(a)
op(a)
[[ ... ]]
[[...]]

and so on

@gaogaotiantian
Copy link
Owner

Are you using an REPL? As op returns the object, so REPL will print the returned object, which will result in print the object twice(one by op and another one by an implicit print). This is track in #73 and I probably will figure out a way to detect REPL and change the behavior.

@CokeStudios
Copy link
Author

Yeah and I'll close this issue.

@CokeStudios CokeStudios closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants