Re: empty list



"slebetman@xxxxxxxxx" <slebetman@xxxxxxxxx> writes:

second rule of optimisation: don't do it.

Well forget machine optimization for a minute, and consider
programmer optimization.

I initialize null lists as [list] to be clear.

I don't prefer lists initialized as {}.

I'd shoot anyone who initialized a list as "".


--
Donald Arseneau asnd@xxxxxxxxx
.



Relevant Pages

  • Re: [QUIZ] DayRange (#92)
    ... If it's a class you want, beside initialize, what methods are you asking for? ... which of following do you consider valid argument lists for 'initialize'? ... into a more human-readable string. ... 1,2,3,6,7: Mon-Wed, Sat, Sun ...
    (comp.lang.ruby)
  • Re: Data sticking around too long
    ... Putting initialization in the constructor ... class ScannerCommand: ... variable and the two instances have their own lists. ... If I do initialize ...
    (comp.lang.python)
  • Re: Data sticking around too long
    ... Putting initialization in the constructor ... class ScannerCommand: ... variable and the two instances have their own lists. ... If I do initialize ...
    (comp.lang.python)
  • Re: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync
    ... some way to initialize SRCU structs staticalyl. ... * The mutex locks both lists. ... adjust_jiffies(CPUFREQ_PRECHANGE, freqs); ...
    (Linux-Kernel)
  • Re: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync
    ... some way to initialize SRCU structs staticalyl. ... * The mutex locks both lists. ... adjust_jiffies(CPUFREQ_PRECHANGE, freqs); ...
    (Linux-Kernel)