-
Notifications
You must be signed in to change notification settings - Fork 284
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
Python binding construction/deconstruction non-idiomatic #13
Comments
Thank you for your suggestion. I think your code is good. This change does not guarantee backward compatibility. So I have to upgrade major version but will not. Because This project is still not enough to become v1.0. So we will resolve this issue at v0.2. |
If the |
구현 과정에서 여러 가지 문제점이 발생하여 위 f5d93fd 커밋은 롤백했습니다. 좀 더 논의가 필요해 보입니다.
결국 2)의 내용만 남게 되어 생성자의 마지막에 open() 메서드를 호출하도록 했는데 3)의 문제가 있는 코드를 이곳에 올려놨습니다. 로그 레벨 설정을 생성자의 마지막에 받도록 하는 부분을 넣어야 하나 고민 중입니다. |
생성자에 |
The current initialization pattern looks like this:
Which effectively feels like a double construct. The issue is minor, but doesn't feel like idiomatic Python. Since calling the constructor is a contract that implies the caller is willing to do have the object ready, the second
open()
call feels rather odd. Same applies for the destructor, although this would be less of an issue since delete semantics are consistent and for most of the part the magicalclose()
function will be obstructed away from the user.What if, for example it worked like this by folding the two constructs into one?
The text was updated successfully, but these errors were encountered: