Python Forum
[PySimpleGUI] Tutorial - Name, Address, Phone GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PySimpleGUI] Tutorial - Name, Address, Phone GUI
#37
(Aug-11-2018, 02:05 AM)jfong Wrote: [ Why bring complexity into this situation when you have a simple soultion? The ListDict may be a cute design but is verbose here and creates extra obstacle to the user.

It actually doesn't bring any additional complexity from a caller's standpoint. They never even know it's a not a dictionary or a list. If the caller specifies a key, then the return values act like a dictionary. If no keys are specified, it acts like a list.

When printed, for example, it will print as either a list or a dict. When it comes to syntax, the code looks exactly the same for both the user wishing for a list and for the user wanting to use a dict. Try out the latest version on GitHub and you'll see what I mean. Try to ignore the implementation detail and instead focus on the syntax.
Reply


Messages In This Thread
RE: [PySimpleGUI] Tutorial - Name, Address, Phone GUI - by PySimpleGUI - Aug-11-2018, 09:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PySimpleGUI Try Except jamesaarr 1 1,991 Nov-18-2021, 02:02 PM
Last Post: jamesaarr

Forum Jump:

User Panel Messages

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