These are chat archives for dropbox/pyston

7th
Mar 2016
An Long
@aisk
Mar 07 2016 04:12
@undingen Hi I had a problem in PR #1103 , the vararg and kwarg are basically InternedString, and AST_arguments have no lineno attributes. So if the vararg and kwarg were duplicated, we don’t know which line throw the exception.
An Long
@aisk
Mar 07 2016 07:31
Should we change it to AST_Name ?
Kevin Modzelewski
@kmod
Mar 07 2016 07:57
Interestingly, it looks like CPython throws the exception for the line the "def" is on, not the duplicated argument
def f(a,
        b,
        b):
    pass
Gives
  File "t.py", line 1
    def f(a,
SyntaxError: duplicate argument 'b' in function definition
An Long
@aisk
Mar 07 2016 08:07
@kmod got it, I’ll change it from throwing from the function def line number
An Long
@aisk
Mar 07 2016 08:12
Out of the topic, if something CPython’s implementation is not good enough, and we have ideas to solve it, and it cause some imcompatibility, like this issue above (althogh this one is not a big problem), should we respect CPython’s implementation?
Thomas Mangin
@thomas-mangin
Mar 07 2016 09:10
@aisk I believe Pyston should honour CPython bugs. Some code may rely on bugs (unknowingly) - the Python team themselves have this stance ..
says a voice from the back of the tinterweb
Dong-hee Na
@corona10
Mar 07 2016 10:01
If python makes bug pyston also makes same bug this is my opinion
Kevin Modzelewski
@kmod
Mar 07 2016 16:20
Yeah, I guess the question is will they think it makes sense to change their behavior
There was one thing that we reported back that was obviously a bug (a bad assertion in the code), and they fixed it :)
I'm not sure what they would say about this one, but you can always start an email thread / file a bug on their tracker and see what they think
And then if they choose to keep their behavior I would think it makes sense for us to match it too
Anyway, that was a roundabout way of saying -- yes, I think we should generally try to match their behavior even if we don't like it