Few things

bearophile bearophileHUGS at lycos.com
Tue Nov 30 18:46:39 EST 2004


Thank you Josiah Carlson for your answers. If certain parts of my
messages upset you, then you can surely skip those parts.
(Now I am reading a big good manual: "Learning Python, II ed.", so in
the future I hope to write better things about this language.)


>That is simple and clean?<

Well, it's a clean way to express such complexity.
And now I think decorators aren't so fit for such purpose (they
produce less clear pre-post). The pre-posts in the docs seem better to
me.


>Then again, I document and test, and haven't used pre/post conditions
in 5+ years.<

Yep, documentation and doctests (etc) are useful.


>>but I've seen that lots of people have already discussed such
topic).<<

>Discussion of the @ decorator syntax is a moot point.<

I know, I noticed that... Still, only few things are fixed in stone
:-]


>Think of it like an 'example' in the documentation, where the code is
provided for doing both permutations and combinations.<

Ah, now I see.
In my original post of this thread I have given an URL of some
routines written in C because they are about 10 times faster than the
routines that I can write in Python.


>>If you are interested I can give the Python Quickselect code, etc.<<

>No thank you, I have my own.<

I see. I haven't tried to force you to take my routines, but to offer
any interested person a way to cheek my words.


>Ick.  In Python, the language is generally read left to right, in a
similar fashion to english.  The prefix notation of 0<octal> and
0x<hex>, in my opinion, reads better than your
postfix-with-punctuation notation.<

As you say, it's your opinion, and I respect it, but in mathematics I
think you usually put the base at the end of the number, as a small
subscripted number (but I understand your following explanations).


>I'll also mention that two of your examples; afa35a_16 and Fi3pK_64,
are valid python variable names<

Uh, I am sorry... As I feared, I have written a silly thing :-)


>I much prefer just using decimal and offering the proper base
notation afterwards in a comment...<

I agree.

I'll avoid to give hugs,
Bearophile



More information about the Python-list mailing list