materials-ml-workshop's People
Forkers
enriquepacismaterials-ml-workshop's Issues
Issue on page /data_types/sets_and_dicts.html
The example John von Neumann dictionary should read:
person = {
'name' : 'John von Neumann',
'age' : 53,
'occupation' : 'Mathematician',
'birthday' : ('December ', 28, 1903)
}
To have correct birthday and age at death.
Issue on page /functions/classes.html - Advanced Tip on Special Class Methods
In the Advanced Tip on Special Class Methods on the Classes and Object-Oriented Programming page, the description for __repr__()
mentions that it is called by print()
to produce the string representation of the object. This is not entirely correct, in a subtle way.
print()
actually calls __str__()
to produce the human-readable string representation of the object. If no custom __str__()
implementation is provided by the class, the default implementation merely returns the result of __repr__()
. The goal of __repr__()
is to return a valid python expression that can be used to recreate the object (if possible).
In the context of introducing beginners to Python, it may be more advisable to teach them about __str__()
instead of __repr__()
.
More info on __repr__()
and __str__()
is available here.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.