[issue5231] Change format of a memoryview

Antoine Pitrou report at bugs.python.org
Tue Aug 23 16:06:34 CEST 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> Hmm, indeed. How about:
> 
> 1) memoryview(a, format='B')
> 
> Shadows a builtin function; annoying syntax highlighting in current Vim.
> 
> 2) memoryview(a, fmt='B')
> 
> I'm fully expecting a comment about 'strpbrk' again, but I like it. :)

I really prefer "format", it's the natural word to use there.
I don't think this the only place where we shadow a builtin function.
There are probably variables named "dict" in many places.

> Also, we've to see about speed implications. My current version of memoryview
> (not pushed yet to the public repo) also solves #10227, but is pretty sensitive
> even to small changes.

Well, solving #10227 would be nice, but I don't think it's critical
either.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5231>
_______________________________________


More information about the Python-bugs-list mailing list