Tour
About Us
Meta
Loading…
current community
Stack Exchange
chat
Meta Stack Exchange
your communities
Sign up
or
log in
to customize your list.
more stack exchange communities
company blog
Log in
Stack Exchange
All Sites
Top Users
Digests
Alex Waygood
top
accounts
reputation
activity
subscriptions
Top Questions
14
votes
The Liskov Substitution Principle, and Python
object-oriented
python
liskov-substitution
asked Aug 31, 2021 at 13:54
softwareengineering.stackexchange.com
7
votes
How can I document methods inherited from a metaclass?
python
python-3.x
metaclass
class-method
docstring
asked Aug 22, 2021 at 16:07
stackoverflow.com
5
votes
How to detect if `__init_subclass__` has been overridden in a subclass?
python
oop
inheritance
asked Oct 31, 2021 at 13:24
stackoverflow.com
Top Answers
56
How to hint at number *types* (i.e. subclasses of Number) - not numbers themselves?
stackoverflow.com
51
How do I get Pylance to ignore the possibility of None?
stackoverflow.com
25
Exclude some attributes from __str__ representation of a dataclass
stackoverflow.com
19
Using Python enums to define physical units
codereview.stackexchange.com
18
Type hint for return value in subclass
stackoverflow.com
18
mypy error: Incompatible types in assignment (expression has type "Dict[<nothing>, <nothing>]", target has type "List[str]")
stackoverflow.com
17
Unpack a tuple and assign a variable to the second value only if the first value is truthy
stackoverflow.com
14
Why do I get a 'FutureWarning' with pandas.concat?
stackoverflow.com
11
Mypy - why does TypeVar not work without bound specified
stackoverflow.com
9
First non-repeating Character, with a single loop in Python
codereview.stackexchange.com
8
Should `isinstance()` check against typing or collections.abc?
stackoverflow.com
8
How to typecheck class with method inserted by metaclass in Python?
stackoverflow.com
7
Type hints for variably-nested Dict in Python
stackoverflow.com
7
Instance attribute that has a name starting with two underscores is weirdly renamed
stackoverflow.com
7
Python - Is there a shorthand for [eg]: print(f'type(var) = {type(var)}')
stackoverflow.com
7
How to pass ForwardRef as args to TypeVar in Python 3.6?
stackoverflow.com
7
Assigning permissions to multiple endpoints for a user and company
codereview.stackexchange.com
7
Bidirectional iterate over list in Python
codereview.stackexchange.com
7
A Hit Counter For AWS Python Lambda powered with DynamoDB
codereview.stackexchange.com
6
mypy "is not valid as a type" for types constructed with `type()`
stackoverflow.com
6
Mypy: Annotate function where return type depends on the type of an argument
stackoverflow.com
6
Type-hinting parameters with a sentinel value as the default
stackoverflow.com
6
Make your code error, but only sometimes!
codegolf.stackexchange.com
6
How to type-hint / type-check a dictionary (at runtime) for an arbitrary number of arbitrary key/value pairs?
stackoverflow.com
5
How can I make "isinstance" on Protocols also include function signatures and data-types?
stackoverflow.com
5
What is the right way to check if a type hint is annotated?
stackoverflow.com
5
Type-hinting a tuple without being too verbose
stackoverflow.com
5
How to set a class method return typing dynamically from a class property
stackoverflow.com
5
Why won't mypy understand this object instantiation?
stackoverflow.com
5
Mypy accepts an incompatible type in __init__ override
stackoverflow.com
1
2
next
Stack Exchange works best with JavaScript enabled