-
Notifications
You must be signed in to change notification settings - Fork 44
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
Pathlib open #57
Pathlib open #57
Conversation
What is the CI error with 3.6 about? I am not able to interpret the shell output. |
Good morning @karlicoss , it's your final decision because you are the maintainer. I am totally fine with this. I will update my PR as you wish; maybe to tonight. But please give me the opportunity to answer your arguments. I don't assume that this will turn your opinions/decisions. But I think it is important because this is a public discussion. And please keep in mind that English isn't my nativ language. My knowledge about the exact meaning or weight of some vocabulary is partly limited. Therefore, there is not only the risk that some things could be misunderstood in terms of content but also understood as impolite. ☮️
I'm not a python core dev but from my understanding it is fact that it is more efficient. You run it 1.000 times. 1.000 time checking with an
This wasn't about time optimization in the meaing of make orgparse running faster because it is slow now. It is just about saving energy (CPU cycles and RAM) in the context of sustainable software development (sometimes called Green Computing).
This is for you not everyone else. It is a matter of taste and convention. The latter is if you are used to it the code becomes quit clear when reading it. But of course your taste counts here because you do most of the maintaining (reading code) stuff.
It is not "pythonic" to keep all user mistakes or possible edge cases into account. That is why we have exceptions. In the end an exception is thrown, the users opens a ticket, etc. But of course we have to think about edge cases. Here I couldn't think about an edge case causing trouble and all your unittest where green.
You are absolutaly right about it. My mistake. The
Matter of taste.
That is the point. The type information doesn't matter anymore here. That is a feature of Python not a bug. ;)
This is a point I don't understand or don't see.
I don't think about that but energy and CO2. |
I removed the Using But
Not sure if and how to handle that. |
OK, I modified my PR as you asked. Can I add something more to get this PR going? |
Dear @karlicoss , |
Hi! Sorry -- I had an issue with github notification, only seen this now. I fixed the remaining mypy issue myself and merged -- will do a new release shortly |
Here we are. I will give details about the improvements and arguments for them in direct code comments.
Intention
My intention was a "bug" I haven't reported in an Issue. I can't use
orgpase
in my unittests when usingpyfakefs
. The latter use "faked"Path
objects that are not recognized by that line.if isinstance(path, (str, Path)):
With this fix my own code using pyfakefs works well.