The Who What Where and Why of wikipython
There are no ‘catches’ to using this site. No registration is required. No email addresses to “see more information”. No cookies. No ads (at least yet, maybe ever). There are no fees. No contributions are accepted. No promises are made. Nobody here is looking for a job or clients. Nobody here is trying to establish any academic credentials. There are no agendas being pushed and no subjects unrelated to Python and Raspberry Pi. Once in a great while a user will send us a note of thanks, a boo-boo they discovered, or a suggestion for something new – and that is just fine with us. email: oakey.john@yahoo.com
ABOUT: Python 3.5 and UP and Raspberry Pi – maybe later about the BBC Micro:Bit too
This site is all about explanations with examples. Lets say your interest is in creating and using a Python dictionary – so you look it up and you get, from the Python Software Foundation site:
class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg)
Return a new dictionary initialized from an optional positional argument and a possibly empty set of keyword arguments.
Oooookkk. You are new to Python, or maybe you are 12 years old. I wonder if you know what a “class” is, what a “**kwarg” is, what mapping does, what iterable even means. I wonder if you have a clue what “an optional positional argument” could be. The objective here is to eliminate as much “geek speak” as possible and give clear, regular English explanations without using words like “hashable”. There will also be examples of how whatever we are discussing is used and works. Example you can type or copy then test and play with yourself. You’ll learn that other stuff soon enough – when you need it. Right now let’s just get you started. We’ll try to explain a term you really need and skip the ones you don’t.
FAQ’s
What is Python (and Why Is Taking Over the World)?
Python is an open-source, free, high level, easily obtained, extremely flexible, highly structured, modular, cross-platform, object-oriented computer programming language written by Dutch programmer Guido van Rossum and administered by the Python Software Foundation. It’s a great “beginner” language that is slowly becoming a dominant mainstream programming tool because of its extensisble design and because people like Google are adopting it whole cloth.
If this is all news to you, don’t start here,
start there -> https://www.python.org/about/
As to why Python is going to take over the world: in The Adventure of English Melvyn Bragg lays out a good case why a minor dialect of the lower classes in the early middle ages became the dominant world language – because it was taught to tiny children in multiple language cultures at the knees of their nannies. This happened even when it was looked down upon by their adults. The Raspberry Pi, and now the BBC Micro:Bit, both aimed at introducing a generation of children to technology and programming, both use Python as a principal language.
Despite its shortcomings (which our benevolent dictator abjures with some reason) Python is bound to evolve and succeed.
Why is There NO GOTO Statement in Python?
Oh get over it. The truth is you can’t handle the truth. But if you really want the truth here it is: you are not smart enough to use GOTO correctly so it is probably better if you just do without. OK, there are some rare circumstances when GOTO would be vastly more efficient than the twisted-sister code you will have to use to replace it. For example, suppose you have a program that that must immediately make a decision to run what amounts to two or three entirely different and mostly unrelated programs. Look to error handling in C for another superior way to employ it. That said 99.999% of all programmers, including you, would just use it to create unreadable spaghetti-code. That’s been proven by 50 years of experience with most of the languages that preceded Python.
Why is there no GOSUB Statement in Python?
There is. It’s just been efficiently structured and called a FUNCTION. Functions are at the heart of Python. Modules are really just wrappers for groups of usually related functions.
Contacts
No Registration is required on this site – we tried it but just about got spammed out of existence.
I am delighted to receive emails with cogent and sincere suggestions and observations: oakey.john@yahoo.com.
This is a non-commercial site – not getting much Google play – but now being cited at the collegiate level as a Python resource. I’d love to include and give full attribution to about anything involving Python and Raspberry Pi provided it is concise, friendly, highly documented and in keeping with the spirit of Python – which comments by the Godfather you can look up elsewhere. …and it does not, at least overtly, promote your commercial objectives. Attribution, however, can include your company name and/or employment objectives – 1 line for each.
Thanks and good coding.
John