Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
empty arguments
#10
(Apr-27-2017, 05:02 PM)micseydel Wrote: I've only ever seen it as a gotcha, including for experienced Python programmers, and have never actually seen this used for caching or anything like that (and I'd be reluctant to accept it as a good use case).
Well, I have some experience, and though I've never seen it used by anyone else, I used it a couple of time. Does improving performance by 100-s of percents in resource-hogging time-critical apps count as a good cause(yes, occasionally improving performance counts, even in Python   Tongue ).

Of course, you have to keep in mind
  • Cache maintenance - you may easily end up with memory leak
  • You cannot re-assign cache - you may clean it, but you must preserve the reference
I am not sure if 4 years of Python (first time I used this technique couple of years ago) would define me as experienced Python programmer  Confused , but I have some experience with programming... Snooty
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
empty arguments - by noob - Apr-27-2017, 07:16 AM
RE: empty arguments - by buran - Apr-27-2017, 07:26 AM
RE: empty arguments - by volcano63 - Apr-27-2017, 11:26 AM
RE: empty arguments - by noob - Apr-27-2017, 07:37 AM
RE: empty arguments - by wavic - Apr-27-2017, 11:46 AM
RE: empty arguments - by volcano63 - Apr-27-2017, 11:47 AM
RE: empty arguments - by buran - Apr-27-2017, 11:56 AM
RE: empty arguments - by volcano63 - Apr-27-2017, 12:02 PM
RE: empty arguments - by micseydel - Apr-27-2017, 05:02 PM
RE: empty arguments - by volcano63 - Apr-28-2017, 03:31 AM
RE: empty arguments - by micseydel - Apr-28-2017, 06:07 AM
RE: empty arguments - by volcano63 - Apr-28-2017, 09:47 AM
RE: empty arguments - by nilamo - May-11-2017, 04:03 PM
RE: empty arguments - by volcano63 - May-11-2017, 05:20 PM
RE: empty arguments - by micseydel - May-11-2017, 05:31 PM
RE: empty arguments - by volcano63 - May-11-2017, 05:36 PM
RE: empty arguments - by micseydel - May-11-2017, 10:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Functions (Arguments Passing,Changing a mutable ,Assignment to Arguments Names) Adelton 2 3,918 Mar-02-2017, 10:23 PM
Last Post: zivoni

Forum Jump:

User Panel Messages

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