3 ms·
I'm not sure if we are on the same page. I am simply talking about syntactic sugar, not semantics. To restate, I still don't understand why you think str.
by selcuka 5y ago
I'm not sure if we are on the same page. I am simply talking about syntactic sugar, not semantics.
To restate, I still don't understand why you think
str.dropFirst(1).dropLast(2)
handles unicode better than
str[1:-2]
What does dropFirst(1) drop if the first _element_ is a Black Santa? Why can't whatever it does be implemented using the bracket syntax?