> Ralf W. Grosse-Kunstleve wrote: > > >>> import std_vector > > __main__:1: DeprecationWarning: assignment shadows builtin > > >>> dir(std_vector) > > ['__doc__', '__file__', '__name__', 'array_cast', 'boost_array_sum', > > 'cos', 'double', 'float', 'in_place_multiply', 'int', 'long', 'size_t'] > > > > std_vector is a Boost.Python extension module [Neil] > I suspect the warning is shown due to the way Boost builds the namespace > of the extension module. Shadowing of builtin names is checked by the > setattr method of the module type. Boost is probably using > module_setattr to populate the global dictionary. There's nothing wrong > with doing that except that it triggers a spurious warning. But this is yet another situation where this warning is issued but it really shouldn't be issued. I'm beginning to think that perhaps we should make it a PendingDeprecationWarning instead? That should be simple even this close to the 2.3c1 release. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4