• Guido van Rossum's avatar
    SF patch #408326 by Robin Thomas: slice objects comparable, not · a1351fbd
    Guido van Rossum yazdı
    hashable
    
    This patch changes the behavior of slice objects in the following
    manner:
    
    - Slice objects are now comparable with other slice objects as though
    they were logically tuples of (start,stop,step). The tuple is not
    created in the comparison function, but the comparison behavior is
    logically equivalent.
    
    - Slice objects are not hashable. With the above change to being
    comparable, slice objects now cannot be used as keys in dictionaries.
    
    [I've edited the patch for style.  Note that this fixes the problem
    that dict[i:j] seemed to work but was meaningless.  --GvR]
    a1351fbd
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
setup.py Loading commit data...