Late-binding of function defaults (was Re: What is a function parameter =[] for?)

BartC bc at freeuk.com
Fri Nov 20 09:00:13 EST 2015


On 19/11/2015 22:41, Laura Creighton wrote:
> In a message of Thu, 19 Nov 2015 22:57:10 +0200, Marko Rauhamaa writes:

> Note: Ned Bachelder (who is probably reading this on python-list
> anyway added cc on this mail, as if I am to discuss somebody, however
> briefly, they deserve to hear about it.  Which may irritate him to
> get 2 copies instead of one, but so it goes.  I am talking about
> BartC as well, but since this is his thread, I assume he is here.)

Actually that thread was started by 'fl'.

> Sometimes you want to understand what you are doing.  Sometimes
> you just want to do it.  And sometimes, well, the only real way
> to get an understanding of what you are doing is to do it more.
> This is, in my opinion, Bartc's problem. He doesn't program in
> python enough to understand it more.

That's true. I'll have to do a substantial project soon. But a lot of my 
interest is about comparisons between Python and the languages I work on.

(Especially of speed. Up to now my interpreters have been comfortably 
faster. But with PyPy I might now have do do a bit more work on mine 
next year. This is where a proper application is needed for comparison 
and not small benchmarks.)

I'm also interested in what handy features I can 'borrow' from Python. 
Enough that I was planning a big upgrade earlier this year to bring it 
more into line with how Python works. (/That/ is a good way of learning 
about a language! To try and implement a lookalike.)

But that was changing my language too much (I was losing too many 
features of my own) so it was abandoned. (Perhaps it can be a separate, 
higher level language at some point as I quite like the Python style 
even if I have misgivings about some features.)

> They have the opposite problem of BartC -- they want to be excellent
> programmers without understanding anything, while he wants to
> understand everything before he knows how to write decent python code.

I can already tell you that I will never be able to write 'Pythonic' 
code if that is what you mean by 'decent'. But at least everyone will be 
able to understand it!

-- 
Bartc



More information about the Python-list mailing list