Home » Python (page 2)


Parsing In Python: Tools And Libraries

This is an article similar to a previous one we wrote: Parsing in Java, so the introduction is the same. Skip to chapter 3 if you have already read it. If you need to parse a language, or document, from Python there are fundamentally three ways to solve the problem: use an existing library supporting that specific language: for example ...

Read More »

Python Try and Except Example

Today we will talk about one of the most important things in Python – exception handling. Firstly, let’s start with the definition of exceptions. They are errors detected while the program is being executed. So for example, if you write the program and you think it’s alright and try running it, it may give you some errors. 1. Basic exceptions ...

Read More »

Python Datetime Tutorial

Today we will learn how to work with dates and time. It’s an essential skill because in almost every Python program you work with time one way or another. It can be really confusing at first how to work with them because we have dates, time, timezones, timedeltas. Table Of Contents 1. Introduction about datetime module 2. Examples 2.1. Basic ...

Read More »

Python Regular Expression Tutorial

One of the most daunting tools at the beginning, but quite powerful if you master it, is regular expressions. They seem scary and hard to understand, but once you get used to them, you realize how powerful they are. So in this article, I will try to guide you through them, so they won’t seem complicated to you, especially if ...

Read More »

Python Class Inheritance Example

Today we will be talking about OOP method of programming. The particular area of our interest would be Inheritance. Before we go any further, let’s talk about basic principles of programming. We know that there is an imperative method (when we use for and while loops), functional (when we operate with functions) or Object Oriented Programming (where we write code ...

Read More »

Using the New Python Instance Properties

Last week, I showed you my new implementation for instance-level properties in Python. This week, we’ll take another look at it by implementing a few Delegated Properties and helpers to make using them just a hair nicer. Recreating Kotlin’s Built-In Delegates For inspiration of what Delegated Properties to create, we’ll start by recreating the ones built into Kotlin, starting with ...

Read More »

Another Look at Instance-Level Properties in Python

A while back, I did a post on making instance-level properties in Python where the implementation of it required inheritance as well as messing with __getattribute__() and __setattr__(), which are a little dangerous to mess with. Then I had another idea last night (as of the time of writing this): Use normal descriptors to delegate to “Delegated Properties” (name taken ...

Read More »

Want to take your WEB dev skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • PHP Programming Cookbook
  • jQuery Programming Cookbook
  • Bootstrap Programming Cookbook
  • Building WEB Apps with Node.js
  • CSS Programming Cookbook
  • HTML5 Programming Cookbook
  • AngularJS Programming Cookbook