True, False, None

Michele Simionato mis6 at pitt.edu
Wed Nov 12 15:20:00 CET 2003


Alex Martelli <aleax at aleax.it> wrote in message news:<eQmsb.9095$9_.364153 at news1.tin.it>...
> Michele Simionato wrote:
>    ...
> > BTW, I would have been favorable to "Staticmethod", "Classmethod",
> > "Super", etc. since they are all classes. But it is useless to protest now
> > :-(
> 
> Well, understanding is never useless.  So could you please clarify why
> you think of (e.g.) staticmethos as needing a different capitalization
> from (e.g.) int?
> 
> >>> type(staticmethod)
> <type 'type'>
> 
> >>> type(int)
> <type 'type'>
> 
> Why is staticmethod "a class" to you while int presumably isn't?

Actually, I would prefer "Int" over ""int" ;) 
I am not sure I would like to impose the capitalization (the way Ruby 
does) but I would be happier with a strict standard code convention 
saying "classes are capitalized". Of course, I am not proposing to
change anything. It is a very minor annoyance I can very well live
with. 

> To me, personally, all of this debates only underscores yet again the
> one serious "ergonomic" defect in Python's syntax -- case sensitivity.
> 
> The desire to distinguish between uppercased "classes" and lowercased
> "types" when they're becoming undistinguishable by design in the
> language is (in my warped worldview) due to having case sensitivity
> in the language at all.  Ah well, I've basically lost that debate in
> the past, already!

I never understood why you advocate case insensitivity. I would expect
case insensitivity to be a source of bugs: for instance, identifiers
with similar names could be confused (es. myfunction vs. myFunction):
one would expect them to be different (at least people coming from 
case insensitive languages) whereas they would be the same.
Also, now I can write 

ONE=1

and

def one(): return 1

and it is clear that the first name (ONE) refers to a constant 
whereas the second name (one) refers to something which is not a constant.
In a case insensitive language I am sure I would risk to override constants
with functions. When I learned C (coming from Basic and Pascal) I
thought case sensitivity was a good idea, why you don't think so?
(you are free to point me to old posts if this, as I suspect, has
been debated to death already ;)

                                             Michele




More information about the Python-list mailing list