Code Monkey home page Code Monkey logo

materials-ml-workshop's People

Contributors

cburdine avatar enriquepacis avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

enriquepacis

materials-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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.