lordmauve/pgzero

Add __repr__ to built-in objects

Aperta

#100 aperta il 29 lug 2018

 (3 commenti) (0 reazioni) (0 assegnatari)Python (211 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (608 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Having added a REPL (in #80), Pygame Zero's built-in objects can now be explored in the REPL. However, they do not generally have a defined __repr__.

For example,

>>> screen
<pgzero.screen.Screen object at 0x7fe27cb29208>

>>> keyboard
<pgzero.keyboard.Keyboard object at 0x7fe285085160>

Implementing this would make these more usable in the REPL.

Guida contributor