My python annoyances so far

2007-04-25 Thread flifus

Hi all. I'm learning python these days. I'm going to use this thread
to post, from time to time, my annoyances with python. I hope someone
will clarify things to me where I have misunderstood them.

Annoyances:

1. Underscores! What's the deal with that? Especially those double
underscores. The best answer I read on this is that the double
underscores denotes special methods that the interpreter may
automatically use. For example, 4+4 get expanded by the interpreter to
4.__add__(4).

2. There are modules, there are functions, and there are classes-
methods! Wouldn't it have been easier had everything either been a
function or a class method?

-- 
http://mail.python.org/mailman/listinfo/python-list


Where did my post go?

2007-04-25 Thread flifus

I posted to this newsgroup earlier about my annoyances with python and
now I can't find the post. What did you do with it?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: My python annoyances so far

2007-04-26 Thread flifus
On 26 Apr, 12:00, Bjoern Schliessmann  wrote:
> [EMAIL PROTECTED] wrote:
> > Hi all. I'm learning python these days. I'm going to use this
> > thread to post, from time to time, my annoyances with python. I
> > hope someone will clarify things to me where I have misunderstood
> > them.
>
> > Annoyances:
>
> > 1. Underscores! What's the deal with that? Especially those double
> > underscores. The best answer I read on this is that the double
> > underscores denotes special methods that the interpreter may
> > automatically use.
>
> That's right. But what's the annoyance here?
>
> It's a clear seperation. A bigger annoyance would be if the method
> name were, e. g., "add". Now you define your own class, don't think
> about this and define a method "add" yourself, and you wonder why
> your class behaves strangely.
>
> > 2. There are modules, there are functions, and there are classes-
> > methods!
>
> You forgot static methods and types. And all of them are objects.
>
> > Wouldn't it have been easier had everything either been a
> > function or a class method?
>
> IMHO no (this isn't Java). Why should I have to define a class if I
> just code a little script with a few functions? That would be
> forcing the programmer into using a programming paradigm.
>
> Will you ask why there is no StringBuffer in Python? :)
>
> Regards,
>
> Björn
>
> --
> BOFH excuse #385:
>
> Dyslexics retyping hosts file on servers

Hi. You wrote c++, didn't you?

Well, why do some things in the library have to be functions, and
other things have to be class methods?

Why aren't they all just either functions or class methods? like
perhaps ruby.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: My python annoyances so far

2007-04-27 Thread flifus
On 26 Apr, 21:50, Bjoern Schliessmann  wrote:

> > like perhaps ruby.
>
> If I were rude, I would ask now why you don't use ruby. But I bet
> ruby has some annoyances ready for you too.
>
> Regards,
>
> Björn
>
Well, I'd use ruby but python is everywhere, and ruby isn't. All the
applications that interest me are scriptable in python, not ruby.

-- 
http://mail.python.org/mailman/listinfo/python-list