Showing posts with the label
type-hinting
Issue python version: 3.10.2 It was of my understanding that list[str|int] should allow three dis…
Issue I have this piece of code: import enum class Color(enum.Enum): RED = '1' B…
Issue If I want to have a type that can be multiple possible types, Union s seem to be how I repres…
Issue I'm trying to split my huge class into two; well, basically into the "main" cla…
Issue I am writing a CustomEnum class in which I want to add some helper methods, that would then b…
Issue The function below receives a instance of a type (e.g. int ) and returns a instance of anothe…
Issue Is it possible to use type hinting when unpacking a tuple? I want to do this, but it results…
Issue I am writing a "plugin" for an existing python package and wondering how I would pr…
Issue What is a best way in Python to hint a filename, so that it's acceptable to pass anything…
Issue I have a class structure that looks something like this: class Base: class Nested: …
Issue I have Pandas lambda function which I use with rel="nofollow noreferrer"> .apply…
Issue I have a Python function which accepts XML data as an str . For convenience, the function a…
Issue Suppose I have a function: def get_some_date(some_argument: int=None) -> %datetime_or_No…
Issue Does the typing module (or any other module) exhibit an API to typecheck a variable at runti…
Issue Using Python 3's function annotations, it is possible to specify the type of items contai…
Issue The code: So I have super simple code files as follows: First, my schema definition file: s…
Issue Before 3.10, I was using Union to create union parameter annotations: from typing import Un…
Issue I'm trying to type hint a numpy ndarray like this: RGB = numpy.dtype[numpy.uint8] Three…
Issue How do I use type hints to annotate a function that returns an Iterable that always yields t…
Issue I have a function that takes a tuple of different lengths as an argument: from typing impor…