Python Forum
preferred?: multiple assignment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
preferred?: multiple assignment
#7
(Dec-19-2016, 08:00 AM)Skaperen Wrote:
(Dec-17-2016, 07:56 AM)micseydel Wrote: All the more reason it shouldn't be preferred  :)
agreed Dance

On the contrary... both of these are invalid Python
a,b,c,e,f=x,x,x,x,x
a,b,c,d,e,f=x,x,x,x
So even if a human doesn't notice the problem, Python will. While:
a,b,d,e,f=x
is correct and you'll be told about the unitialized c much later.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
preferred?: multiple assignment - by Skaperen - Dec-03-2016, 03:18 AM
RE: preferred?: multiple assignment - by micseydel - Dec-03-2016, 03:27 AM
RE: preferred?: multiple assignment - by nilamo - Dec-05-2016, 10:57 PM
RE: preferred?: multiple assignment - by Skaperen - Dec-17-2016, 03:28 AM
RE: preferred?: multiple assignment - by micseydel - Dec-17-2016, 07:56 AM
RE: preferred?: multiple assignment - by Skaperen - Dec-19-2016, 08:00 AM
RE: preferred?: multiple assignment - by Ofnuts - Dec-19-2016, 06:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Preferred way to slice a list SvetlanaofVodianova 3 2,647 Dec-09-2019, 11:50 PM
Last Post: SvetlanaofVodianova
  Is Event.set() the preferred way to stop a thread? svetlanarosemond 5 3,964 Jul-17-2018, 08:14 AM
Last Post: DeaD_EyE
  a preferred choice os the two lines? Skaperen 9 6,544 May-27-2017, 02:31 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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