Python
Decorator
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
OK..
that´s better, now Ic can say I´m trying to understand the decorators
I think rigth now I´ll try to define some iterator, and get some practice..
that´s better, now Ic can say I´m trying to understand the decorators

I think rigth now I´ll try to define some iterator, and get some practice..
-
- Posts: 3
- Joined: 7 years ago
- Gender:
Re: Python
hello, Python advantages compared to java
Re: Python
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
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..)
and i like it becasuse you most make a "good structured program" to can work(you know, the identation thing..)
Re: Python
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
Yes I have seen zen already, but I don't understand some lines
in python the english is so hard..
in python the english is so hard..
Re: Python
Jajajaja Python English is hard?? Jajaja good definition… Yes it happened to me too.
Re: Python
well i'll give you an advice:
don't try to make the 1767 in python..
first you most program it in c++..
don't try to make the 1767 in python..
first you most program it in c++..
Python Round and Arrays
Hi, congratulations!!, great posts !!!
Now, I´m looking for a nice "how to" round in python ??
and
I really need understand how work this:
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 !!
Now, I´m looking for a nice "how to" round in python ??
and
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
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 !!