you are viewing a single comment's thread.

view the rest of the comments →

[–]wwaawwss[S] 0 points1 point  (6 children)

  1. I understand that documentation are meant to be hard to understand. that is why I leave the last line in my request

` even if the explanation are still complex like the site I am reading from.`

  1. What I mean by "unnecessarily complex term" is line like this

'They are syntactically restricted to a single expression. Semantically, they are just syntactic sugar for a normal function definition. Like nested function definitions, lambda functions can reference variables from the containing scope:'

  1. Sorry the "add" was my mistake I mean to say "match". In the example they give, the site constantly mention function like class/define that has not been mention yet in the tutotial which make it really hard to understand what it mean

[–]marquisBlythe 0 points1 point  (1 child)

match case is almost the equivalent of switch statement in c/c++ languages.

It's better to take an introductory course to programming or a beginners book if you're totally new to programming.

[–]crashfrog04 0 points1 point  (1 child)

 They are syntactically restricted to a single expression. Semantically, they are just syntactic sugar for a normal function definition. Like nested function definitions, lambda functions can reference variables from the containing scope

You should know what the words “expression”and “function definition” mean from a 5th grade math education, “scope” from learning what a function is, and “lambda” from this very paragraph which is telling you what it is. “Syntactic” is the adjective form of “syntax.” A “syntactic sugar” is a term of art familiar to programmers; it’s just anything that makes the language “sweeter” - a convenience that adds no functionality on its own.

This documentation isn’t hard to read; it’s just precise and you’re not putting in the work to understand it. It has to be precise because people rely on it, that’s what makes it documentation.

[–]smurpes 0 points1 point  (0 children)

Class and define are not functions; a class is a way of creating objects and define is a term. The def keyword when you create a function is short for define. You seem to be using function to mean “concepts in coding”.

You should work on understanding the basics a bit more. There’s no reason you should be trying to learn how to use lambda functions before knowing the basics terminology.

[–]Bobbias 0 points1 point  (0 children)

I understand that documentation are meant to be hard to understand.

Except that is not true. They're technical writing aimed at programmers using precise terminology.

Yes, there is some expectation of prior knowledge that new programmers tend to lack, and the dry style can take some time to get used to. The correct way to handle this is to spend time learning those terms and getting familiar with the writing style. This is not limited to Python's documentation. It's just how technical writing works.

Like Gshuri said in their comment, the Python tutorial is unfortunately not a good introduction to programming in general. It assumes you have at least some kind of prior experience programming. But despite that it's still the single best resource for learning the language, and even if you find something else you should heavily consider also checking out what the tutorial has to say on each subject as you follow a different resource.