What are some things one may dislike about Python?

In this article, we will look at some of the things that most people dislike about Python programming language and examine whether these criticisms are valid.

Using Indentation Instead of Curly Braces

Many people complain that Python fully relies on indentation to build code blocks. In Python, as you may know, indentation is not optional. The complaints vary, but they frequently include one or more of the following ?

It is Difficult to Tell Where a Function Ends

This is true when writing large Python functions. However, it would be advantageous if you avoided writing large functions altogether. This is true for any language, not just Python. A function should only do one thing well. If you find yourself developing a multi?page function, break it up into smaller functions that only do one thing.

This produces more than just clean, legible code. It also produces testable code. Unit tests for short functions that accomplish only one thing with no side effects are simple to write. When you develop huge functions that do a lot of things, you can only write integration tests.

Multiple Python Versions

We have seen users dislike Python because it has two versions? Python 2 and Python 3.

To make this situation worse, they are frequently installed beside one another on Linux. Although both were formerly prevalent (and incompatible), this is far less of an issue today than it was.

Most projects have now migrated their code to Python 3, however, this was not always the case. Unfortunately, because so many packages took their time to make sure to convert to Python 3, many Linux distributions have been driven to ship with two versions of Python.

To sum up?yes, it was a true point for a few years during the Python 3 transition, but it's largely resolved now.

Python is Slow

Here's another reason people dislike Python. Python was not intended to be the fastest language in the world. There's also the Python GIL, which isn't nearly as bad as people make it out to be.

In fact, Python as a language prioritizes understandable, clean code over mere speed. So, no, Python is not the quickest language. Yet, we find many people complaining about it without actually having a speed issue, or at least without first attempting to fix their own inefficient code.

If you have a speed issue in Python, there are several things you can do to speed up your code. One of them is using concurrency. However, most of the time, it is simply a matter of optimizing your code.

You can look into the following ?

  • Caching

  • Bloom filters

  • Use of appropriate data structures

  • Minimize the amount of work you do inside loops

  • Prevent recursion

Alternatively, consider speedier Python implementations such as PyPy and CPython. As if that weren't enough, several of the most popular Python programs, such as NumPy, have their essential functionality implemented in C. As a result, replacing your code with functionality from libraries here and there may produce better outcomes.

Python Does Not Scale Well for Large Projects

In debates, many people heard individuals defend Python only to conclude that it's a scripting language that doesn't scale well into larger projects. And it's just not true. People are aware of several huge applications that are running smoothly. In fact, Python includes all of the necessary tools for scaling ?

  • If you like, you can divide the project into different packages

  • Modules can be used

  • It allows for object?oriented programming

Python scales just as well, if not better, than any other language. Many large?scale applications like Instagram, YouTube, and Dropbox are built using Python, demonstrating that Python can be used to create huge, complex applications.

Python is Just a Typeless Scripting Language

This is partially true and partially false. Python is an excellent programming language. It allows us to quickly put together a script to accomplish specific tasks without having to define types explicitly beforehand. It enables us to prototype and do quick tests.

This type of typing flexibility is known as dynamic typing. The variable lacks a type, yet the object you create does. Aside from that, Python is a strongly typed language, which means that once an object is created, its type will not change.

The string "2," for example, will not suddenly transform into a number when used in an equation like "2" + 2. If you do, Python will throw a TypeError.

Example

# This will raise a TypeError
try:
    result = "2" + 2
except TypeError as e:
    print(f"Error: {e}")
Error: can only concatenate str (not "int") to str

Python now provides a great hybrid model with the inclusion of explicit type support. They appear to have found the sweet spot. Leave out the typing if you're hacking away. When writing apps, though, you can (and should) specify types. The interpreter will ignore them, but your linter and/or IDE can use them to catch potential issues.

The Python community appears to have accepted the new explicit typing. FastAPI, a popular API framework, uses typing extensively. It's one of the reasons it's so simple to use?because of explicit typing, you get excellent auto?completion in your Python IDE as well.

Python Includes Some Ugly Global Functions

There are no global functions in object?oriented languages such as Java. In Python, examples of such functions are len() and print().

The most common issue we hear about len() is that the length should be part of the object, not a global function.

Why, for example, is there no length() method to retrieve the length of a Python list ?

input_list = [4, 6, 2, 1]

# This will NOT work - no length method
try:
    print(input_list.length())
except AttributeError as e:
    print(f"AttributeError: {e}")

# You must use len() function
print(f"Length: {len(input_list)}")
AttributeError: 'list' object has no attribute 'length'
Length: 4

However, there are reasons why Python has the len() function instead. It's actually a deliberate design choice.

In other languages (Java, for example), the length can be obtained by calling a method on the object. But which method is it? Is it ?

  • .length()

  • .size()

  • .numItems()

  • ...etc

Is it a variable, such as .length or .size? As a Java developer, I've seen all of these and more variations. Standardizing such a common activity makes sense. The len() function will work if your Python object implements the __len__() dunder method. All you have to do is get used to it.

Conclusion

While Python has some aspects that certain developers dislike, most criticisms stem from misunderstandings or can be addressed with proper practices. Python's design choices prioritize readability and simplicity over speed, making it an excellent choice for many applications.

Updated on: 2026-03-26T23:24:28+05:30

289 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements