Page 3 of 4


Posted: Fri Jun 08, 2012 10:10 am
by Phantom
No, you use the “@” only to say that you are using that function as a decorator. The problem in the decorator is that they receives another function, and return a new one, and that new function is the function that will replace the old one. You must understand only that, and you will understand decorators.

Re: Python

Posted: Fri Jun 08, 2012 6:52 pm
by Robbin
that´s better, now Ic can say I´m trying to understand the decorators :D
I think rigth now I´ll try to define some iterator, and get some practice..

Re: Python

Posted: Sun Jun 10, 2012 7:24 pm
by aslf010990
hello, Python advantages compared to java

Re: Python

Posted: Sun Jun 10, 2012 7:50 pm
by Phantom
Is very easy answering that question, and at the same time, is very large. In few words I can say you that Python have a very simple syntax (more than Java, C, C++, C#, …) seem pseudo code. You do many things in less code. Is a language very simple and less dense than Java. This language is complex but not complicated. Python is a dynamic language and it saying many things. With Python you see the future in the present. The free software love Python (for example, Linux), most things in Linux is in this language. You have not compile your code to test it, in Python you can program in a TEXT, you save it like .py, and you can execute it!!

Re: Python

Posted: Thu Jun 14, 2012 1:34 pm
by Robbin
yes, python has a lot of unknown things(for me)..

and i like it becasuse you most make a "good structured program" to can work(you know, the identation thing..)

Re: Python

Posted: Thu Jun 14, 2012 5:44 pm
by Phantom
Yes, thank you Robbin for help me to complement my arguments. That is one of the things I love of Python, your program in Python is naturally beautiful because the language force you to program beautiful. That make me remind the Zen of Python. One of the things the Zen of Python say is (beside is the first one): “Beautiful is better than ugly.” You want see The Zen of Python, by Tim Peters?? Type in Python: “import this”, and… cachan!! This is ones of the politics of the free software: Have good humor sense.

Re: Python

Posted: Sat Jun 16, 2012 9:45 am
by Robbin
Yes I have seen zen already, but I don't understand some lines
in python the english is so hard..

Re: Python

Posted: Fri Jun 22, 2012 7:42 pm
by Phantom
Jajajaja Python English is hard?? Jajaja good definition… Yes it happened to me too.

Re: Python

Posted: Fri Jun 22, 2012 8:40 pm
by Robbin
well i'll give you an advice:
don't try to make the 1767 in python..
first you most program it in c++..

Python Round and Arrays

Posted: Tue Dec 03, 2013 8:34 am
by ypozo
Hi, congratulations!!, great posts !!!

Now, I´m looking for a nice "how to" round in python ??
I really need understand how work this:

Code: Select all

matrix = [[int(i) for i in raw_input().split()] for i in range(cant)] #in just a line of code

Course that this fill a matrix with ints, BUT wich numbers?: withs zeros or with 1, 2, 3 ... cant ???
I need know how to make the classic " int[] arr = new int[cant]; " in python (including that the major of langs fill with zeros 0 )

Best regards !!