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

Chris Angelico rosuav at gmail.com
Thu Nov 26 08:15:10 EST 2015


On Thu, Nov 26, 2015 at 11:53 PM, BartC <bc at freeuk.com> wrote:
> FWIW here is that list of features that are different between Python and my
> language, or that work a different way, or that I think could be a useful
> addition. (Although Python's internal workings make many impractical.)
>
> http://pastebin.com/JrVTher6
>
> This is not an attempt to compare the complete languages as they are for
> different purposes (mine is more low-level, simpler, smaller and designed to
> make it easier to create an efficient byte-code interpreter for it).

"I think Python now has hex, octal and binary literals. X allows any
base from 2 to 16: 2x10101 is binary, while 4x101 is quaternary (ie.
20)."

Do you mean that 4x101 means 1*(4*4) + 0*(4) + 1? If so, it would be
17, not 20. Is this a typo in the document, or am I misunderstanding
your syntax?

#14 and #15: Are you assuming that a character is a byte and that
diacritical-free English is the only language in the world? Case
insensitivity is a *pain* when you try to be language-agnostic; for
instance, the case-folding rules of English state that U+0069 LATIN
SMALL LETTER I and U+0049 LATIN CAPITAL LETTER I are identical, but
Turkish would upper-case the first to U+0130 LATIN CAPITAL LETTER I
WITH DOT ABOVE and lower-case the second to U+0131 LATIN SMALL LETTER
DOTLESS I. German has U+00DF LATIN SMALL LETTER SHARP S (also called
eszett), which traditionally upper-cases to "SS", which lower-cases to
"ss".

ChrisA



More information about the Python-list mailing list