Talk:Shift list elements to left by 3: Difference between revisions

From Rosetta Code
Content added Content deleted
(Pylint flags `list` as a predefined name)
 
(rotate vs. shift)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
===Pylint suggestions for current Python draft===
===Pylint suggestions for current Python draft===


Pylint flags up (inter alia) the point that `list` is a predefined name (for the list constructor function) in Python. Perhaps worth using an alternative name, to avoid confusion ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 10:49, 20 March 2021 (UTC)
Pylint flags up (inter alia) the point that `list` is a predefined name (for the list constructor function) in Python. Perhaps worth using an alternative name, to avoid confusion ?

( That might also, on reflection, make it a little easier to extend those functions to allow for arguments of type `range(m, n)`, in addition to the arguments of type `list`, to which I think they are restricted at the moment. You would need the eponymous Python list() function to make the conversions from ranges ).

[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 10:49, 20 March 2021 (UTC)

== Rotate vs. Shift ==

[[wikipedia:Logical_shift|"Logical shift"]] is different from [[wikipedia:Circular_shift|"Rotate" or "Circular Shift"]] and we should probably acknowledge in the task description that there's another kind of "shift" which some people are likely to want in some contexts. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 23:06, 17 December 2022 (UTC)

Latest revision as of 23:06, 17 December 2022

Pylint suggestions for current Python draft

Pylint flags up (inter alia) the point that `list` is a predefined name (for the list constructor function) in Python. Perhaps worth using an alternative name, to avoid confusion ?

( That might also, on reflection, make it a little easier to extend those functions to allow for arguments of type `range(m, n)`, in addition to the arguments of type `list`, to which I think they are restricted at the moment. You would need the eponymous Python list() function to make the conversions from ranges ).

Hout (talk) 10:49, 20 March 2021 (UTC)

Rotate vs. Shift

"Logical shift" is different from "Rotate" or "Circular Shift" and we should probably acknowledge in the task description that there's another kind of "shift" which some people are likely to want in some contexts. --Rdm (talk) 23:06, 17 December 2022 (UTC)