[Tutor] Need some clarification on this

2011-03-19 Thread Yaşar Arabacı
a=5 b=5 a == b True a is b True My question is, why a is b is true. What I expected it to be is that, a and b are different things with same value. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

[Tutor] Check my dummy application

2011-03-16 Thread Yaşar Arabacı
, as in spaces, line breaks, upper-lower cases etc. And any additional comment is also welcome. Best Regards, Yaşar Arabacı ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo

Re: [Tutor] How to use a str object, to find the class in exact name?

2011-03-15 Thread Yaşar Arabacı
. Is there a way to get expected number of arguments to the method so that I can generate an error report? You can find my codes as attachment. I have split them into two files. In order to run it, you should run cli.py like: python cli.py Thanks in advance, Yaşar Arabacı 15-03-2011 05:39, bob gailer

Re: [Tutor] Static Variable in Functions

2011-03-14 Thread Yaşar Arabacı
Wow. That was a great explanation indeed. Thanks a lot. After reading this, I discovered something like this, and found it pretty insteresting indeed: a=[a] b=[a] a.append(c) b [['a', 'c']] a.append(d) b [['a', 'c', 'd']] Apperantly, I can change something (which is mutable) inside a

[Tutor] How to use a str object, to find the class in exact name?

2011-03-14 Thread Yaşar Arabacı
Hi I am trying to do something like this: #!/usr/bin/env python def command_dispatcher(): Takes comman line arguments and executes regardin method command = raw_input() args = command.split( ) args[0].args[1] class calculate: def bundle(self):

Re: [Tutor] How to use a str object, to find the class in exact name?

2011-03-14 Thread Yaşar Arabacı
-2011 00:14, Steven D'Aprano yazmış: Yaşar Arabacı wrote: Hi I am trying to do something like this: If you are trying to write a mini-language, the ``cmd`` and ``shlex`` modules in the standard library may be useful to you. #!/usr/bin/env python def command_dispatcher(): Takes comman line

Re: [Tutor] How to use a str object, to find the class in exact name?

2011-03-14 Thread Yaşar Arabacı
As I try to implement things with getattr, I am getting a really strange error. This is my file: #!/usr/bin/env python # -*- encoding:utf-8 -*- class global_variables: Holds class attributes, so that other classes can share them products = 0 best_bundle = [] class

[Tutor] Static Variable in Functions

2011-03-13 Thread Yaşar Arabacı
Hi, As I am starting to learn python, I follow dive into python. As I read object section, I came across something called class attributes and data attributes. Because of the reason that class attributes look and behave exactly like static variables in other languages (as I have used in php

Re: [Tutor] What's an IndentationError How Do I Fix It

2011-03-12 Thread Yaşar Arabacı
You could use any amount of spaces before your code. Just to remember being consisted, as every level of spaces counts as different code block. When you want to get out of indentation, just enter a line without indenting it. 12-03-2011 18:20, Dorje Kawabata yazmış: I'm using the python

[Tutor] what is 2.7 equiavelent of apihelper

2011-03-12 Thread Yaşar Arabacı
library. I was wondering if there is something else in 2.7 can be used instead of apihelper. Best Regards, Yaşar Arabacı ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo

[Tutor] New person greets you all!

2011-03-11 Thread Yaşar Arabacı
Hi, First of all, I want to greet you all since this is the first time I will be using this mail groups. I consider myself being familiar with programming logic, structures in general. I do/did lots of PHP programming. I know python and PHP is pretty much different things, I am saying this

Re: [Tutor] New person greets you all!

2011-03-11 Thread Yaşar Arabacı
I see all of you guys suggest that starting with 3.x. I was wondering what is setback of starting with 2.7 since my linux distro (openSUSE 11.4) comes with it and it would be pretty painfull for me to update to 3.x because lots of my applications in my computer depends on it. So is it worth