[issue29475] option to not follow symlinks when globbing

2017-02-07 Thread Ben Longbons
New submission from Ben Longbons: Background: I have a data hierarchy with a lot of "sibling" symlinked directories/files. I want to glob only the non-symlink files, because it's a *huge* performance increase. Before `os.scandir`, I was using a local copy of `glob.py` a

[issue19240] iglob should try to use `readdir`

2017-02-07 Thread Ben Longbons
Ben Longbons added the comment: This is a duplicate of bug 25596, which is now fixed. -- nosy: +o11c ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue2786] Names in traceback should have class names, if they're methods

2015-08-25 Thread Ben Longbons
Ben Longbons added the comment: I made a minimal gist of my motivating code: https://gist.github.com/o11c/ce0c2ff74b87ea71ad46 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2786

[issue2786] Names in traceback should have class names, if they're methods

2015-08-25 Thread Ben Longbons
Ben Longbons added the comment: Code objects currently have no mutable fields. So what are you planning to do about things like: Foo = namedtuple('Foo', 'x y') def frob(self): return self.x + self.y # probably actually done via a @member(Foo) decorator # so adding more code here

[issue24791] *args regression

2015-08-04 Thread Ben Longbons
New submission from Ben Longbons: The following code is allowed by the grammar of Python 3.4, but not Python 3.5: `def f(): g(*a or b)` where unary `*` has the lowest precedence, i.e. it is equivalent to: `def f(): g(*(a or b))` The cause of the regression that the 3.4 grammar for `arglist

[issue24791] *args regression

2015-08-04 Thread Ben Longbons
Ben Longbons added the comment: Related: bug 24176 fixed this for the `**` case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24791

[issue24791] *args regression

2015-08-04 Thread Ben Longbons
Ben Longbons added the comment: Also consider: *() or (), *() or () [*() or (), *() or ()] {*() or (), *() or ()} {**{} or {}, **{} or {}} Note that the second-or-later argument is a separate part of the grammar so that's why I wrote it twice. Actually, I think `star_expr` will probably go

[issue15248] In TypeError: 'tuple' object is not callable, explain that a comma may be missing

2012-07-05 Thread Ben Longbons
Ben Longbons b.r.longb...@gmail.com added the comment: This kind of debug your code is the kind of thing I've gotten used to from the Clang C/C++ compiler. Granted, compiled languages have an advantage here, but enough residual information remains for the interpreter at runtime. And I am

[issue15248] In TypeError: 'tuple' object is not callable, suggest a comma.

2012-07-03 Thread Ben Longbons
New submission from Ben Longbons b.r.longb...@gmail.com: I frequently construct lists of tuples, such as: [ (1, 2, 3) # oops, missing comma! (4, 5, 6) ] It would be nice if the error message gave a hint on what was *actually* wrong. Although I always use homogeneous containers, the type

[issue15196] os.path.realpath gets confused when symlinks include '..'

2012-06-26 Thread Ben Longbons
New submission from Ben Longbons b.r.longb...@gmail.com: I encountered this bug with the following filesystem layout project/build/bin/main-gdb.py - ../src/main-gdb.py project/build/src - ../src/ project/src/main-gdb.py - ../py/main-gdb.py project/py/main-gdb.py where root/py/main-gdb.py

[issue15196] os.path.realpath gets confused when symlinks include '..'

2012-06-26 Thread Ben Longbons
Ben Longbons b.r.longb...@gmail.com added the comment: Yeah, this is a duplicate of issue 6975. Sorry also about the version thing. Although I can set this as closed: duplicate, I don't seem to be able to set what bug this is a duplicate of. -- resolution: - duplicate status: open

[issue6975] symlinks incorrectly resolved on Linux

2012-06-26 Thread Ben Longbons
Ben Longbons b.r.longb...@gmail.com added the comment: After filing a duplicate, issue 15196, I analyzed this: What happens: test/one/that_dir test/one/../two/this_dir/this_dir/this_dir/this_dir test/two/this_dir/this_dir/this_dir/this_dir test/two/this_dir/this_dir/this_dir/../two test/two