Éric Araujo <mer...@netwok.org> added the comment:

> Not being able to use 'type' directly is rather annoying, so after figuring 
> that bug out I set
> some time aside to make it easier for the next person.
If you make a patch for #15002 then by all means rename “type” to “filetype” so 
that you can use the type function without jumping through hoops.  Or see if 
using isinstance can avoid the need for type.

Note that Python lets you override a built-in name, it’s only a PEP 8 
convention that recommends to avoid doing so.  In many cases it makes a lot of 
sense to name something “type” (typically a class attribute), “file” (like in 
the print function in 3.x) or “open” (see tarfile, gzip, tokenize, etc.).

> This could be considered a bug that urllib is hard to debug
I don’t think so; we prefer keeping the code similar between branches so that 
patches are easier to port.

> and breaks vim's syntax highlighting.
I am a Vim user and think there are great things (like the fact that string 
delimiters are not highlighted as string contents) and debatable things (like 
the special color for self and built-in functions).

Your help with fixing bugs is very appreciated, but I think this patch will be 
rejected.

----------
status: open -> pending

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15280>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to