Skip to main content

Final classes for Python 3

Project description

final_class Build Status

Final classes for python3.6+.


  • No metaclass conflicts
  • No runtime overhead
  • No dependencies
  • Type hints included
  • Designed to be as simple as possible


In languages like java we have a nice way to restrict subclassing any class by making it final:

public final class SomeClass {
  // ...

In python we don't have such feature out of the box. That's where final_class library comes in!


pip install final_class


from final_class import final

class Example(object):  # You won't be able to subclass it!

class Error(Example):  # Raises `TypeError`



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

final-class-0.1.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

final_class-0.1.2-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page