fluentpython / example-code-2e

Example code for Fluent Python, 2nd edition (O'Reilly 2022)
https://amzn.to/3J48u2J
MIT License
3.17k stars 902 forks source link

Example 8-17 - Different output from expected #20

Closed CavalcanteLucas closed 2 years ago

CavalcanteLucas commented 2 years ago

Hello,

Can someone please help me understand what am I doing wrong? The example 8-17 shows this expected output:

image

But this is what I got instead: image

I also tried that in the console session (using IPython v.7.29.0): image

Is it something that might be related to different python versions (mine is 3.8.10)? Sorry if this is outdated.

Hope to hear from you, Kind regards

CavalcanteLucas commented 2 years ago

Oh, one must use python to open the session, not ipython. Apologies for the false alarm.

image