Message381796
> something[::-1] = something
I was thinking this for a while, and this is the actual reason that I didn't propose this until I saw someone's comment under Raymond's tweet about 'slices are not hashable' (https://twitter.com/4skvictor/status/1330433911646785539). At least for optimization, IMHO it worth taking the shot.
> I could definitely see code using duck-typing via slices to distinguish sequences from other iterables and mappings
That sounds a bit unorthodox. It is a very common practice to use ABCs for doing these checks but I've never seen a piece of code where they test if something is a mapping or not by throwing unhashable things in it. |
|
Date |
User |
Action |
Args |
2020-11-25 08:47:40 | BTaskaya | set | recipients:
+ BTaskaya, rhettinger, mark.dickinson, christian.heimes, Mark.Shannon, serhiy.storchaka, josh.r, pablogsal |
2020-11-25 08:47:40 | BTaskaya | set | messageid: <1606294060.3.0.235009443702.issue42454@roundup.psfhosted.org> |
2020-11-25 08:47:40 | BTaskaya | link | issue42454 messages |
2020-11-25 08:47:40 | BTaskaya | create | |
|