Sunday, November 22, 2020

Python #001 - keywords, classes and instances

 

 

I wanna to get to the Google Drive API and JIRA and connect them together. In order to do that I've tried to prepare code in C#. I managed to do that... but if I want to deploy it online I need a server and more skill to that. I decided to switch to Python - there are people who will help me to deploy this kind of app.


So what is Python?

Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale project.

Where to start?

I started with classes and instances. A great read over here: https://docs.python.org/3/tutorial/classes.html

There is "a little bit" different syntax than in JAVA (not so complex). This is my first class

The best example to explain how to use class variable shared by all instances and instance variable unique to each instance:

What about the keywords?

Keywords are special words which are reserved and have a specific meaning. Python has a set of keywords that cannot be used as variables in programs.

All keywords in Python are case sensitive.

Python Keywords Display Using Python Shell 

A quick shortcut to print the list of all the keywords: