Posts by cfelipe • 351 points
5 posts
-
6
votes4
answers242
viewsA: What’s behind the "go"?
See documentation on the statement for and Iterators. In the statement for letra in frase: we have the following: for calls the function __iter__() of the object frase. The function __iter__()…
-
15
votes4
answers4098
viewsA: What is pythonic code?
Pythonico means idiomatic. Idiomatic code is one that is written using the most common structures and conventions of a particular language. Example: Most Python programmers write: for elemento in…
-
2
votes1
answer5446
viewsA: Python 3 import of classes
The ideal is to put everyone in one package. Structure your project folder like this: meuprojeto/ __init__.py app.py Usuario.py Banco.py Whereas __init__.py is a file with nothing. When a page has a…
-
1
votes2
answers2077
viewsA: What Class Does in Python
In Python, the statement class defines a class. In Python, classes are basically dictionaries that can also contain functions and allow such functions to match the references of the dictionary…
-
1
votes1
answer218
viewsA: How to set $GOPATH to existing folder?
$GO_PATH is the enviroment variable that defines where all your things related to Go will be, including All bilbiotecas you download. All project source code. All binary files resulting from the…