Hopefully that was a dataclass :)

But yes, point taken. Classes need to be there. And now I've gone and re-read the table of contents for the tutorial, I really don't have any complaints about the high-level ordering. It does seem to go unnecessarily deep in some areas (*very* few people will ever need position-only parameters, for example, and I'd say all special parameters matter more in the tutorial because of how you _call_ them, rather than how you define them).

Cheers,
Steve

On 06Nov2020 1714, Guido van Rossum wrote:
I agree with you that the tutorial should focus at users, not library developers. But assuming that users will never write a class seems wrong. For example, while ago I went through a PyTorch tutorial, which assumes barely any programming knowledge, and yet the first or second example has the user write a class, as this is apparently the conventional way to store parameters for ML models.

--Guido

On Fri, Nov 6, 2020 at 8:32 AM Steve Dower <steve.do...@python.org <mailto:steve.do...@python.org>> wrote:

    It would also be nice for the tutorial to separate between "things you
    need to know to use Python" vs "things you need to write a Python
    library".

    For example, the fact that operators can do different things for
    different values (e.g. int, str, list, pathlib) would be in the first
    category, while the details of how to override operators can wait for
    the second.

    I see many people suffer from content that goes too deep too quickly,
    and I'm more and more convinced over time that this is the right place
    to draw a separator for Python. Many devs are just using the language
    and never implementing a class (or often, even writing a function).
    Having a canonical tutorial to get these users through this stage first
    before going deeper would be great.

    Cheers,
    Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VVJOMFE44ZO6UTA432EQGPSHZI23ULQU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to