Re: [Tutor] Const on Python

2008-03-08 Thread Ricardo Aráoz
Jeff Younker wrote: On Mar 7, 2008, at 7:48 PM, Ricardo Aráoz wrote: Alan Gauld wrote: Well, I guess it's about what you think a programmer is. I think if you are a true programmer you'll be good in ANY language (though you may have your preferences) and you'll be able to do 80% of your

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
Andreas Kostyrka [EMAIL PROTECTED] wrote Yes, the problem is, that these guys are anyway forced to have Python/Erlang developers on board, because of external opensource components they need to maintain. And that one fact completely changes the economics and thereby renders the lead position

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
Kent Johnson [EMAIL PROTECTED] wrote in (Jumping in against my better judgment :-) :-) Hmm...sure, programming is not about typing, it is about figuring out what to type. With Python the conceptual activity takes place at a higher level because - Python provides easy-to-use, high-level

Re: [Tutor] Const on Python

2008-03-07 Thread Andreas Kostyrka
Am Freitag, den 07.03.2008, 21:13 + schrieb Alan Gauld: Yes but thats not the bit that takes time in my experience its trying to understand the problem. What exactly am I trying to do here? Is it a suimulation exercise, a database problem? A real-time or networking issue? Should my

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Alan Gauld wrote: Absolutely. I totally agree that moving an organization to Python or similar modern language is a sensible move for many applications. Only where very high performance or scaleability are required would Python (or similar) be inappropriate and even in the largest

Re: [Tutor] Const on Python

2008-03-07 Thread Jeff Younker
On Mar 7, 2008, at 7:48 PM, Ricardo Aráoz wrote: Alan Gauld wrote: Well, I guess it's about what you think a programmer is. I think if you are a true programmer you'll be good in ANY language (though you may have your preferences) and you'll be able to do 80% of your work in any

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
The answer is slightly more complex. 1.) objects are either mutable or immutable. E.g. tuples and strings are per definition immutable and constant. Lists and dictionaries are an example of the mutable kind. 2.) variables, instance members are all only references to objects. Examples: # lists

Re: [Tutor] Const on Python

2008-03-06 Thread Tiago Katcipis
thanks for the help Andreas, i dont really need that much a const so i wont do anything like that to have a const like data. I am very used to java and c++, thats why i always used acess modifier, but i think i can live without it now i know that it dont exist in python :P. On Thu, Mar 6, 2008

Re: [Tutor] Const on Python

2008-03-06 Thread Kent Johnson
Tiago Katcipis wrote: thanks for the help Andreas, i dont really need that much a const so i wont do anything like that to have a const like data. I am very used to java and c++, thats why i always used acess modifier, but i think i can live without it now i know that it dont exist in

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
Am Donnerstag, den 06.03.2008, 08:35 -0500 schrieb Kent Johnson: C++ is extremely complex. The good side of this is it gives you tremendous control - final, const, pass by reference or value, memory allocation, etc, etc. The bad side is that it is a lot to think about - should this

Re: [Tutor] Const on Python

2008-03-06 Thread Tiago Katcipis
so far im starting to feel all what you have said. Im using python to implement some works on university and im felling that everything is high level, easy to use, and far easier than c++ and even java. java is less complicated than c++ but cant be compared with the simplicity of python code. And

Re: [Tutor] Const on Python

2008-03-06 Thread Alan Gauld
Now coming back to your question, that you want a non-changeable name, well, one can create such a beast, e.g.: def constant(value): ... class Test(object): const_a = constant(123) This creates a member that can only be fetched, but not set or deleted. Only within constant. the

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
Yes, the problem is, that these guys are anyway forced to have Python/Erlang developers on board, because of external opensource components they need to maintain. Am Donnerstag, den 06.03.2008, 23:54 + schrieb Alan Gauld: Actually I'm with the lead here. The cost of developing a new

[Tutor] Const on Python

2008-03-05 Thread Tiago Katcipis
Its a simple question but i have found some trouble to find a good answer to it, maybe i just dont searched enough but it wont cost anything to ask here, and it will not cost to much to answer :-). I have started do develop on python and i really liked it, but im still learning. Im used to

Re: [Tutor] Const on Python

2008-03-05 Thread John Fouhy
On 06/03/2008, Tiago Katcipis [EMAIL PROTECTED] wrote: learning. Im used to develop on c++ and java and i wanted to know if there is any way to create a final or const member, a member that after assigned cant be reassigned. Thanks to anyone who tries to help me and sorry to bother with a

Re: [Tutor] Const on Python

2008-03-05 Thread Tiago Katcipis
Thanks for the help John. I agree with you that the programmer is already a grow person and should know when he can modify a attribute :-). Instead when other people will be able to continue to develop on the code i writed the const would give confidence that someone would not mess with my

Re: [Tutor] Const on Python

2008-03-05 Thread bob gailer
Tiago Katcipis wrote: Its a simple question but i have found some trouble to find a good answer to it, maybe i just dont searched enough but it wont cost anything to ask here, and it will not cost to much to answer :-). Well there is a cost (at least to me) to read all the extra words that