[issue18156] Add an 'attr' attribute to AttributeError

2013-07-07 Thread Dražen Lučanin
Dražen Lučanin added the comment: OK, thanks for the feedback. I signed the CLA. I'll then wait with the remaining work, until a final decision has been made. We have a rough idea of how it could be implemented if it comes to this - adding a wrapper function in Python/err

[issue18156] Add an 'attr' attribute to AttributeError

2013-07-06 Thread Dražen Lučanin
Dražen Lučanin added the comment: I've been working on this at the EuroPython sprint today and it seems the change requires editing >20 files that call PyExc_AttributeError. This means it would be quite a big and dangerous change, so for now I just attach the optional argument

[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Dražen Lučanin
Dražen Lučanin added the comment: @Amaury Forgeot d'Arc - well, the '.' and '..' special files are detected directly in the listdir code, so I don't think there is any need to interleave this logic any deeper (such as os.path.ishidden). @Antoine Pitrou - a o

[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Dražen Lučanin
Dražen Lučanin added the comment: I created a first version of the patch (attached as a remote hg repo). It would enable users to exclude hidden files with: import os print(os.listdir(path='.', show_hidden=False)) while still keeping full backwards compatibility, since show

[issue18087] os.listdir don't show hidden option

2013-05-28 Thread Dražen Lučanin
New submission from Dražen Lučanin: I would like to be able to list a directory, but without showing hidden files. Currently, as discussed in a SO question [1], one has to either code this manually or resort to other libraries (glob). This functionality should be available in the os module

[issue16917] Misleading missing parenthesis syntax error

2013-01-11 Thread Dražen Lučanin
Dražen Lučanin added the comment: Yes, I see your point. Well, for now I am voting for issue1634034 to get some sort of resolution, as Serhiy mentioned, as it might help this scenario as well. Cheers! On Thu, Jan 10, 2013 at 4:29 PM, Ezio Melotti wrote: > > Ezio Melotti added the c

[issue16917] Misleading missing parenthesis syntax error

2013-01-10 Thread Dražen Lučanin
Dražen Lučanin added the comment: Yes, sure, I agree with both comments. Fors are a bit disambiguous in this context in comparison to while loops. But something in the style of Ezio's explanation might come in handy in the error output. e.g. SyntaxError: invalid syntax. "," or

[issue16917] Misleading missing parenthesis syntax error

2013-01-10 Thread Dražen Lučanin
Changes by Dražen Lučanin : -- type: compile error -> behavior ___ Python tracker <http://bugs.python.org/issue16917> ___ ___ Python-bugs-list mailing list Un

[issue16917] Misleading missing parenthesis syntax error

2013-01-10 Thread Dražen Lučanin
New submission from Dražen Lučanin: When running this script: things = ['a', 'b'] things.append('c' for a in things: print a I get the following output: $ python script.py File "script.py", line 3 for a in things: ^ SyntaxE