Home » Python (page 10)

Python

Instance-Level Properties in Python

Making Descriptors that act as specialized properties can be tricky, especially when it comes to storing the data the property controls. I should know, I literally wrote the book. Looking at how other languages do it – especially Kotlin’s Delegated Properties – I felt that Python could use a system that works more like that. Delegated Properties are simply objects ...

Read More »

String Python Comparisons Along

Last time, I talked about Python’s boolean operators and and or and what can be confusing about them when “truthy” objects get into the mix. If you haven’t already read it, I would highly recommend it. This article is similar, but looks into something just a little different: the ability to string comparison operators. The Confusing Code Just like last ...

Read More »

Python: Regex – matching foreign characters/unicode letters

I’ve been back in the land of screen scrapping this week extracting data from the Game of Thrones wiki and needed to write a regular expression to pull out characters and actors. Here are some examples of the format of the data: Peter Dinklage as Tyrion Lannister Daniel Naprous as Oznak zo Pahl(credited as Stunt Performer) Filip Lozić as Young ...

Read More »

File Handling in Amazon S3 with Python Boto Library

1.Introduction Amazon Web Services (AWS) Simple Storage Service (S3) is a storage as a service provided by Amazon.  It a general purpose object store, the objects are grouped under a name space called as “buckets”.  The buckets are unique across entire AWS S3. Boto library is the official Python SDK for software development.  It provides APIs to work with AWS ...

Read More »

“Object Literals” in Python

This may come as a shock to my regular readers, but even as a Pythonista and Kotlinite, I’m a little jealous of JavaScript. That’s right; I – a JS hater – am jealous of JavaScript. More specifically, I’m jealous of JavaScript’s object literals (also full-featured function literals, but I don’t think I can do anything about that). Yes, in many ...

Read More »

The Yin and Yang of Python

It’s time that I got a bit more real with you guys. Pretty much ever since I learned Python, I’ve been touting it as a super amazing language. I’ve been doing the same with Kotlin, but this is about Python. Now, this doesn’t mean I’m going to be changing my tune from here on out; after this, I’m not really ...

Read More »

Best way to learn Python

In this article, we’ll talk about the most efficient way to learn Python. Of course, this article will be really subjective, as it is only based on my personal experience. I’ve started learning Python from it’s 3.4 version. I’ve never actually worked with previous versions, although I coded a little bit just to satisfy my curiosity. Still, the difficulty of ...

Read More »