Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
shift operator on lists
#1
i expected the shift operator to work on lists. it didn't. i guess it's one of those syntactic sugar things since it can be done with slicing and + and * all together. and then there is rotation. easy enough to do without an operator. but it would require something new if it were an operator.

i need to change my thinking to "if it's a non-essential feature, then it's not in Python ... or maybe it is".
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
You need to change your thinking to "This is what's in Python. I guess I'll just deal with it."
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
either way, it's still hard to explain to others, in one concise reasoning, the reasons behind the choices made in Python, so they (and i) can simply understand what would be in Python, and what would not.

(Sep-09-2018, 01:10 AM)ichabod801 Wrote: You need to change your thinking to "This is what's in Python. I guess I'll just deal with it."
or "i believe this is a non-essential feature, so i just won't use it, whether it's in Python or not". oops, i used loop/else today.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
(Sep-09-2018, 02:25 AM)Skaperen Wrote: or "i believe this is a non-essential feature, so i just won't use it, whether it's in Python or not". oops, i used loop/else today.

Or "I have no good response, so I'll just completely twist your words into something nonsensical."
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020