All Projects → moscow-python-beer → final-class

moscow-python-beer / final-class

Licence: MIT license
🔒 Final classes for Python3!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to final-class

OOP-In-CPlusPlus
An Awesome Repository On Object Oriented Programming In C++ Language. Ideal For Computer Science Undergraduates, This Repository Holds All The Resources Created And Used By Me - Code & Theory For One To Master Object Oriented Programming. Filled With Theory Slides, Number Of Programs, Concept-Clearing Projects And Beautifully Explained, Well Doc…
Stars: ✭ 27 (+58.82%)
Mutual labels:  oop, oop-principles
The-Ruby-Workshop
A New, Interactive Approach to Learning Ruby
Stars: ✭ 26 (+52.94%)
Mutual labels:  oop, oop-principles
elegantobjects
Supplementary materials for "Elegant Objects" book
Stars: ✭ 23 (+35.29%)
Mutual labels:  oop, oop-principles
Vert-Core
ServiceContainer for Vue to build Vue applications in OOP.
Stars: ✭ 20 (+17.65%)
Mutual labels:  oop, oop-principles
kactoos
General-purpose collection of OOP primitives for Kotlin
Stars: ✭ 19 (+11.76%)
Mutual labels:  oop, oop-principles
OOP-JavaScript
Learn OOP JavaScript ⚡
Stars: ✭ 23 (+35.29%)
Mutual labels:  oop, oop-principles
spring-SOLID
Spring 예제로 보는 SOLID
Stars: ✭ 53 (+211.76%)
Mutual labels:  oop, oop-principles
design-patterns
Simple examples of Design Patterns with PHP Examples
Stars: ✭ 75 (+341.18%)
Mutual labels:  oop, oop-principles
cactoos-crypto
Crypto extensions for Cactoos library
Stars: ✭ 15 (-11.76%)
Mutual labels:  oop, oop-principles
trac-nghiem-online
Xây dựng hệ thống trắc nghiệm online cho các trường THCS, THPT một cách nhanh chóng và dễ dàng. Không cần phải là lập trình viên
Stars: ✭ 64 (+276.47%)
Mutual labels:  oop
Checkmate
A human vs human chess game build on basic JAVA.
Stars: ✭ 15 (-11.76%)
Mutual labels:  oop
acord
An API wrapper for discord, built using aiohttp and pydantic.
Stars: ✭ 25 (+47.06%)
Mutual labels:  oop
spe
A series of PHP8 examples based around a super simple MVC framework (WIP)
Stars: ✭ 14 (-17.65%)
Mutual labels:  oop
cassidy
Cassidy programming language, bringing static typing, strictness, safety and precision into your web project
Stars: ✭ 25 (+47.06%)
Mutual labels:  oop
convoworks-core
PHP framework for handling conversational services like Amazon Alexa skills, Google Assistant, Viber, FB messenger ...
Stars: ✭ 20 (+17.65%)
Mutual labels:  oop
VecFor
Vector algebra class for Fortran poor people
Stars: ✭ 28 (+64.71%)
Mutual labels:  oop
the-stringler
An OOP approach to string manipulation.
Stars: ✭ 36 (+111.76%)
Mutual labels:  oop
BoardMasters-Question-Of-The-Day
Green River College BoardMasters Club, answers to the question of the day
Stars: ✭ 13 (-23.53%)
Mutual labels:  oop
express-mvc-pattern
Example nodejs using express implementation design pattern using mvc architecture.
Stars: ✭ 52 (+205.88%)
Mutual labels:  oop
ooop
OOP has never been sooo professionally over engineered before.
Stars: ✭ 20 (+17.65%)
Mutual labels:  oop

final_class

wemake.services test codecov Python Version wemake-python-styleguide

Final classes for python3.6+.

Features

  • No metaclass conflicts
  • No runtime overhead
  • No dependencies
  • Type hints included, PEP-561 and PEP-591 compatible
  • Designed to be as simple as possible

Why?

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!

This package works perfectly with @final from typing. So, with final_class you will have both type-checking and runtime checks.

Installation

pip install final_class

Usage

from final_class import final


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


class Error(Example):  # Raises `TypeError`
    ...

More?

Do you want more? Check out:

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].