EuroPython 2021: Speaker Mentorship Program
In the EuroPython community, diversity and inclusion are one of our core values. Therefore, we are launching a Speaker Mentorship Program in this year's edition. * EuroPython 2021 Speaker Mentorship Program * https://ep2021.europython.eu/events/call-for-proposals/ We know how tough it is to prepare for a talk, find & organize the right content around the topic and more so when it's the first time. So what could be better than getting guidance and support from within the community itself. By means of this program, we would like to bridge the gap between a developing and experienced speaker. Hence, we are looking for mentors and mentees to sign up. Please check our CFP page for full details: https://ep2021.europython.eu/events/call-for-proposals/ Applications are open until Friday, April 30, 2021. Quick Summary - EuroPython 2021 will be run online from July 26 - August 1: - Two workshop/training days (July 26 - 27) - Three conference days (July 28 - 30) - Two sprint days (July 31 - August 1) The sessions will be scheduled to ensure they are also accessible for those in the Asian and Americas time zones. Help spread the word Please help us spread this message by sharing it on your social networks as widely as possible. Thank you ! Link to the blog post: https://blog.europython.eu/europython-2021-speaker-mentorship-program/ Tweet: https://twitter.com/europython/status/1387004298211602433 Enjoy, -- EuroPython 2021 Team https://www.europython-society.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Not found in the documentation
On 2021-04-27 06:42:38 -0700, elas tica wrote: > > The *Language Reference* is designed to be much more formally defined, and > > favors correctness and completeness over being easy to access by less > > technical readers. > > > > > Not really my opinion. Language Reference (LR) style is still written > in a conversational style, giving examples instead of definition. The style is certainly less formal that that of - for example - the C standard. However, every text written in a natural language is to some extent informal and open to interpretation. So the real question is: Is the text unambiguous enough so that the intended target audience can agree on the answer to any question? The fact that there exist several Python implementations seems to support that, although I don't know how compatible those actually are and the existence of a reference implementation certainly helps. Everything else is a matter of personal taste. > By the way, how the docs define a container? Answer: "Some objects > contain references to other objects; these are called containers". So > to summarize : "a container contains", what a great definition! That's why it's called a container. But it also says *what* an object must contain to be called a container. You could say that an int object contains an integer value and a str object contains a reference to a buffer containing the string - but those aren't references to other objects, so int and str are not containers. > You said that LR is designed to be much more formally defined, and > favors correctness and completeness. Good, so can you answer this > question after reading the LR : what is a "token"? Did't find a > definition. There is an indirect definition right at the start of chapter 3: "Input to the parser is a stream of tokens, generated by the lexical analyzer." So a token is what the unit of output of the lexer. This is the definition. The rest of the chapter defines the details. > Is the "is not" operator a token? Yes. See chapter 2.3.1. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list
Re: Start Python programming
On 27/04/2021 18:32, Gazoo wrote: > I'd like to start learning Python programming. What sites/tutorials > could you recommend for beginner, please. There is a getting started page on the python web site with links to guide you to many listed suggestions - books, web tutorials, video courses etc. https://www.python.org/about/gettingstarted/ Which one suits you best depends on many factors both objective and subjective. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
cant use certain commands, leading to more problems
Hi i was using python for a while and one day i decided to try out a module called "pyinstaller" i installed it with pip and try to run it as a cmdlet, still didnt work i then searched online for solutions and people tell me to try "python -m pyinstaller" to run it directly with python, still didnt work, i tried pip install it again but all requirements were already satisfied so i heard that the microsoft store's version of python tends to hide itself. and so i uninstalled it but when i typed in to a powershell it just directs me to the mircrosoft store's page i then disabled it from doing that and install python from python.org myself but for some weird reason this time it doesnt work at all, 'python' is somehow not recognized as a cmdlet, bash or command. this also happens with gitbash and cmd ive tried repairing python but still doesnt work if you guys have an idea or a solution to this please let me know or help me through Thanks -- https://mail.python.org/mailman/listinfo/python-list
Plot maps in 3D
Hi, I would like know if it is posible to plot the south in north poles in 3D earth maps. I search in google and always all examples is for cylindric projection, like this: bm = Basemap(llcrnrlon=extent[0], llcrnrlat=extent[2], urcrnrlon=extent[1], urcrnrlat=extent[3], projection='cyl', resolution='l', fix_aspect=False, ax=ax) I try to use the spstere or npstere and I didn't have success. I would like know it is possible use these projections to plot 3D data. Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list
Re: cant use certain commands, leading to more problems
On 4/28/21 4:00 AM, Rasig Kosonmontri wrote: > so i heard that the microsoft store's version of python tends to hide > itself. and so i uninstalled it > but when i typed in to a powershell it just directs me to the > mircrosoft store's page > i then disabled it from doing that and install python from python.org > myself > but for some weird reason this time it doesnt work at all, 'python' is > somehow not recognized as a cmdlet, bash or command. this also happens with > gitbash and cmd If you installed Python from an installer from python.org, did you tell it to put itself into your system PATH? If not, try manually adding the bin folder where it installed to to your system path. As to gitbash, that's an issue with your PATH as well, probably. > ive tried repairing python but still doesnt work > if you guys have an idea or a solution to this please let me know or help > me through Definitely read through the installation documentation: https://docs.python.org/3/using/windows.html -- https://mail.python.org/mailman/listinfo/python-list
Re: Not found in the documentation
Peter J. Holzer a écrit : > That's why it's called a container. But it also says *what* an object > must contain to be called a container. You could say that an int object > contains an integer value and a str object contains a reference to a > buffer containing the string - but those aren't references to other > objects, so int and str are not containers. This is not how I interpret the wording : a string is a container for containing a reference to the characters the string holds. Depends on what you mean by "reference" and "contain". With the definition given, I cannot decide if a string or a range object is a container or not. For instance, can we say that range(100) contains 42 ? PLR document *states* that tuples, lists, sets are containers but doesn't mention if a string is a container or not. Nevertheless, str has a __contains__ method so if a string is not a container what is the logic ? > > You said that LR is designed to be much more formally defined, and > > favors correctness and completeness. Good, so can you answer this > > question after reading the LR : what is a "token"? Did't find a > > definition. > There is an indirect definition right at the start of chapter 3: "Input > to the parser is a stream of tokens, generated by the lexical analyzer." > So a token is what the unit of output of the lexer. This is the > definition. The rest of the chapter defines the details. As you know, the devil is in the details ;) A bunch of properties doesn't make a definition. What do we need is a characteristic property (necessary and sufficient). > > Is the "is not" operator a token? > Yes. See chapter 2.3.1. > 2.3.1 is about keywords : https://docs.python.org/3/reference/lexical_analysis.html#keywords not tokens (keywords are tokens but this is not the problem here). From 2.1.5 (Python 3.9 LR) ... A line ending in a backslash cannot carry a comment. A backslash does not continue a comment. A backslash does not continue a token except for string literals (i.e., tokens other than string literals cannot be split across physical lines using a backslash). A backslash is illegal elsewhere on a line outside a string literal. ... Giving the above, if "is not" were a token as you are explaining, the following code should be invalid syntax : # begin code - 42 is\ not [42] # end code - but this code compiles perfectly (there is a whitespace at the beginning of the second physical line). -- https://mail.python.org/mailman/listinfo/python-list
Re: Not found in the documentation
On Thu, Apr 29, 2021 at 1:21 AM elas tica wrote: > > Peter J. Holzer a écrit : > > > That's why it's called a container. But it also says *what* an object > > must contain to be called a container. You could say that an int object > > contains an integer value and a str object contains a reference to a > > buffer containing the string - but those aren't references to other > > objects, so int and str are not containers. > > This is not how I interpret the wording : a string is a container for > containing > a reference to the characters the string holds. Depends on what you mean > by "reference" and "contain". With the definition given, I cannot decide > if a string or a range object is a container or not. For instance, > can we say that range(100) contains 42 ? Not by that definition of container. There are two completely different concepts that you are conflating: the low level concept that some objects have references to other objects, and the high level concept that some objects support the "in" operator for containment checks. They are similar, in that many objects use "in" to check the exact same set that they refer to, but they are not the same (for instance, range(1, 10, 100) requires a reference to the "one million" integer, even though it is not actually part of the range). > PLR document *states* that tuples, lists, sets are containers but doesn't > mention if a string is a container or not. Nevertheless, str has a > __contains__ > method so if a string is not a container what is the logic ? Same problem. A string would also return True if you ask if it contains any substring (for instance, "test" in "this is a test..." would be True), even though it doesn't show up if you iterate, and the string object most certainly doesn't have a reference to such a substring. > > > Is the "is not" operator a token? > > Yes. See chapter 2.3.1. > > > > 2.3.1 is about keywords : > https://docs.python.org/3/reference/lexical_analysis.html#keywords > not tokens (keywords are tokens but this is not the problem here). > > From 2.1.5 (Python 3.9 LR) > > ... > A line ending in a backslash cannot carry a comment. A backslash does not > continue a comment. A backslash does > not continue a token except for string literals (i.e., tokens other than > string literals cannot be split across physical lines > using a backslash). A backslash is illegal elsewhere on a line outside a > string literal. > ... > > Giving the above, if "is not" were a token as you are explaining, the > following code should be invalid syntax : > > # begin code - > > 42 is\ > not [42] > > # end code - > > but this code compiles perfectly (there is a whitespace at the beginning of > the second physical line). > In what sense of the word "token" are you asking? The parser? You can play around with the low-level tokenizer with the aptly-named tokenizer module. What are you actually trying to prove here? What problem are you solving? Or is this just nitpicking for the sake of it? If your goal is just to nitpick, please be up-front about it, so we can respond accordingly, with appropriate levels of fastidious precision. Also bear in mind: The language can be tokenized differently by different interpreters, so some of the precise details are not part of the language definition. CPython, for instance, is in process of completely rewriting its parser, and I'm not sure how much of that has affected the language definition yet. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Not found in the documentation
Le mercredi 28 avril 2021 à 17:36:32 UTC+2, Chris Angelico a écrit : > > if a string or a range object is a container or not. For instance, > > can we say that range(100) contains 42 ? > Not by that definition of container. Which definition? ;) > some objects have references to other objects, and the high level > concept that some objects support the "in" operator for containment > checks. They are similar, in that many objects use "in" to check the > exact same set that they refer to, but they are not the same (for > instance, range(1, 10, 100) requires a reference to the "one > million" integer, even though it is not actually part of the range). The problem with range is different because we all know that a range object doesn't hold (= contain) the int's (except the endpoints and the step) we can iterate on, instead a range object computes on the fly the int's it holds. On the contrary, the string "2021" holds the digits, even "2021"*10**6 does. But this discussion is undecidable since the Python Language Reference doesn't provide a decent definition of a container. > What are you actually trying to prove here? What > problem are you solving? Or is this just nitpicking for the sake of > it? I was only looking for basic definitions, unfortunately the official docs are not able to provide : - what is the str value of an int? (we have to wait until Python 3.8.6 docs to get the response) - what is a container ? what does mean "contains references" ? is a string a container or not and where the docs explains the answer? - what is exactly a token? are "is not" or "not in " tokens? > the language definition. CPython, for instance, is in process of > completely rewriting its parser, and what about rewriting and *redesigning* the docs? Is there even a discussion about this? Nobody complains? -- https://mail.python.org/mailman/listinfo/python-list
Re: Not found in the documentation
On Thu, Apr 29, 2021 at 5:16 AM elas tica wrote: > > > Le mercredi 28 avril 2021 à 17:36:32 UTC+2, Chris Angelico a écrit : > > > > if a string or a range object is a container or not. For instance, > > > can we say that range(100) contains 42 ? > > Not by that definition of container. > > Which definition? ;) The one you were referring to. The one that was in the quoted text. The one that this subthread is about. Are you deliberately being obtuse? > > some objects have references to other objects, and the high level > > concept that some objects support the "in" operator for containment > > checks. They are similar, in that many objects use "in" to check the > > exact same set that they refer to, but they are not the same (for > > instance, range(1, 10, 100) requires a reference to the "one > > million" integer, even though it is not actually part of the range). > > The problem with range is different because we all know that a range object > doesn't hold (= contain) the int's (except the endpoints and the step) > we can iterate on, instead a range object computes on the fly the int's it > holds. > On the contrary, the string "2021" holds the digits, even "2021"*10**6 does. And by the definition you quoted - that some objects contain references to other objects - the only containment is a range's endpoints. > But this discussion is undecidable since the Python Language Reference > doesn't provide a decent definition of a container. And yet, the definition you're complaining about is easily able to answer these exact questions. > > What are you actually trying to prove here? What > > problem are you solving? Or is this just nitpicking for the sake of > > it? > > I was only looking for basic definitions, unfortunately the official docs are > not able to provide : > > - what is the str value of an int? (we have to wait until Python 3.8.6 docs > to get the response) Before that, people had to use common sense, now there's a documented answer. I'm not seeing a huge problem, but to the extent that it was a problem, it has been solved. > - what is a container ? what does mean "contains references" ? is a string a > container or not and where the docs explains the answer? Are you able to put an object reference inside a string? If not, it is not a container. Is a string object able to keep other objects alive by retaining references to them? No. It's right in the piece that you quoted: some objects contain references to *other objects*. > - what is exactly a token? are "is not" or "not in " tokens? I'm not sure, because it depends on the parser, and different language implementations can use different parsers. To what extent does it make a difference? Where in the docs does something refer to "token" in a way that needs to disambiguate this? > > the language definition. CPython, for instance, is in process of > > completely rewriting its parser, > > > and what about rewriting and *redesigning* the docs? Is there even a > discussion about this? Nobody complains? > A, now I get it. You're one of those people who hates on every change that happens, because some other change didn't happen. Good. Go post on Twitter, you'll fit in just fine. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: cant use certain commands, leading to more problems
On 4/28/2021 10:09 AM, Michael Torrie wrote: On 4/28/21 4:00 AM, Rasig Kosonmontri wrote: so i heard that the microsoft store's version of python tends to hide itself. and so i uninstalled it but when i typed in to a powershell it just directs me to the mircrosoft store's page i then disabled it from doing that and install python from python.org myself but for some weird reason this time it doesnt work at all, 'python' is somehow not recognized as a cmdlet, bash or command. this also happens with gitbash and cmd If you installed Python from an installer from python.org, did you tell it to put itself into your system PATH? If not, try manually adding the bin folder where it installed to to your system path. Or check the option to install the py launcher and use that. No need to fuss with PATH. >py # run interactive python >py filename.py # run python with that file >py -m module # run module as a command -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: Not found in the documentation
Le mercredi 28 avril 2021 à 17:36:32 UTC+2, Chris Angelico a écrit : > In what sense of the word "token" are you asking? The parser? You can > play around with the low-level tokenizer with the aptly-named > tokenizer module. It was a good suggestion, and the PLR doesn't mention the tokeniser module. It should, this goes very well with the conversional style it has. # -- from tokenize import tokenize from io import BytesIO s="""42 not\ in [42]""" g = tokenize(BytesIO(s.encode('utf-8')).readline) print(*(g), sep='\n') # -- outputting: .. TokenInfo(type=57 (ENCODING), string='utf-8', start=(0, 0), end=(0, 0), line='') TokenInfo(type=2 (NUMBER), string='42', start=(1, 0), end=(1, 2), line='42 not in [42]') TokenInfo(type=1 (NAME), string='not', start=(1, 3), end=(1, 6), line='42 not in [42]') TokenInfo(type=1 (NAME), string='in', start=(1, 7), end=(1, 9), line='42 not in [42]') TokenInfo(type=53 (OP), string='[', start=(1, 10), end=(1, 11), line='42 not in [42]') TokenInfo(type=2 (NUMBER), string='42', start=(1, 11), end=(1, 13), line='42 not in [42]') TokenInfo(type=53 (OP), string=']', start=(1, 13), end=(1, 14), line='42 not in [42]') TokenInfo(type=4 (NEWLINE), string='', start=(1, 14), end=(1, 15), line='') TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='') .. So "not in" is not a token and the docs are wrong when they say: .. using a backslash). A backslash is illegal elsewhere on a line outside a string literal. .. -- https://mail.python.org/mailman/listinfo/python-list