Conversation
Python types inherit from each other; bool's are numbers and strings are sequences; so they are special cased.
|
Hi, Paul. Thanks for your work, here! I'd call my Python rusty, but it was never a very highly refined steel to begin with. I appreciate having you two do a bit of sanity checking. Some of the things I did were clearly sub-optimal. On the other hand, I am really not thrilled by four space indents. I have no strong objections to most of PEP 8, but that bit is no good for me. If you would redo this work to omit those changes, I would be very happy to apply it. If you'd rather not, I'll probably rework the commits myself in a week or so. Are you using Rx in Python and finding it useful? That would be delightful to hear. If you're interested in doing even more work on it, you could look at the structured exceptions provided by the Perl implementation and port those over. :-) Thanks again! |
|
Hey Ricardo, I've pulled the changes from @danbornside, they are now on my master also. I can look at reindenting the Python this weekend, and maybe doing some other refactoring. I'm certainly willing to look at the structured exceptions in the Perl implementation, and see how they would translate. Could you please point me to where they are in the Perl implementation? I don't speak Perl, so I'm not really sure where I should be looking and what I should be looking for, to find these exceptions. |
|
Cool, I look forward to updates from you, thanks for your quick reply! There are (at least) two places to look at for the structured errors. The Then maybe look at the code in the Perl test runner which compares the fail it got with the fail it wanted: https://github.com/rjbs/rx/blob/master/perl/t/lib/Test/RxTester.pm#L162 Checks that do "subchecks" (like checking an entry in a dict against the type in a https://github.com/rjbs/rx/blob/master/perl/t/lib/Test/RxTester.pm#L162 Those I think it sounds more complicated than it is. 😄 Probably much of the work could be ported directly from Perl. You might think you don't speak Perl, but there's not a whole lot of difference between Perl and Python, especially the subsets used in Rx. Anyway, if you end up not wanting to go through with that, I can dig it. But if you do, you will totally have a free beer to claim from me… |
|
Things got busy for me, so I haven't had the time to put into this. It's still on my radar, fear not. |
Great to hear, thanks for the report. Just today I was checking my spam trap rjbs |
|
Still on your radar? |
|
It dropped off my radar, but I have some time. I can look into it. On Fri, Jul 24, 2015 at 7:22 PM, Theron Boerner notifications@github.com
|
Updating with 2 years of changes.
|
I assume this is long off-the-radar, and am likely to close it. But I have also been away, so I will give it some time to re-surface! |
|
I'll have to pull master and update. And, again, the Python coding standard is 4 spaces per indent level - see PEP 8 https://www.python.org/dev/peps/pep-0008/ |
|
Hi, what Python library brings |
Hi durey! So, what it sounds like you are trying to do is import TAP.Simple.* to use it for testing. I haven't looked at this library in a long time, so I'm not sure how to pull it in. I'll have a look, and see what I can do. |
|
Exactly, and thanks! I just wanted to run the tests locally. |
|
@durey It turns out getting this to work is a good question. The Rx Python code is using TAP.Simple, and I'm trying to figure out where it gets TAP.Simple. Tappy doesn't seem to provide it. The official documentation seems to suggest a number of libraries: https://github.com/TestAnything/testanything.github.io/blob/master/producers.md |
|
It's here: https://github.com/rjbs/tapsimple I think I wrote it just to get this testing done, and I'm happy to have it ported to anything else. It's not in standard use by … I mean, probably anybody. |
|
I'd like to point out that PEP8'ing someone else's code is generally destructive and not a great use of one's time and effort. Here is a really good talk on the topic by Raymond Hettinger. |
|
@Asday I haven't watched that 1-hour-long video yet, but in any case, keeping coherence inside a project is by far one of the more important stylistic rules, no matter the specific choices. I am not part of that discussion here, but I see the feedback as a coherence requirement (in this project that is using Pep8) over a Pep8-loving requirement. |
|
The operative is "someone else's". |
Hello, I'm Paul Curry.
I was poking at your rx codebase with @danbornside. He has some improvements in mind. The Python coding standard we stick to is PEP8, so we started to clean up the Python code to meet that standard. He started cleaning up the functional code, and I cleaned up the tests. I also added a setup.py, to make this easier to install in Python virtualenv development environments.
So please take a look at the changes I have in this fork. Hopefully either @danbornside will make a pull request soon, or he'll update from my repo and his changes will come in that way.
Thanks!
-Paul Curry