Using type as a keyword argument to a function will mask the built-in function "type" within the scope of the function. So while doing so does not raise a SyntaxError, it is not considered good practice, and I would avoid doing so.

Answer from Brian Gesiak on Stack Overflow
🌐
Python
peps.python.org › pep-0695
PEP 695 – Type Parameter Syntax | peps.python.org
A type parameter declared as part of a generic class is valid within the class body and inner scopes contained therein. Type parameters are also accessible when evaluating the argument list (base classes and any keyword arguments) that comprise the class definition.
🌐
Real Python
realpython.com › ref › keywords › type
type | Python Keywords – Real Python
A soft keyword used to explicitly define generic type aliases in the context of type hints or type annotations.
Discussions

Is it safe to use the python word "type" in my code? - Stack Overflow
That is more than a decade old question and to be on the safe side, I would recommend using kind instead of type as argument. For a long time I was considering building a rename recommendation for all reserved or builins, but seeing your question made me finally do it. Please check python-keyword-... More on stackoverflow.com
🌐 stackoverflow.com
Introduce type keyword for type only imports - Ideas - Discussions on Python.org
After the great work of everyone involved in PEP 810, I would like to propose a new idea that is similar and somewhat changes a bit of the PEP itself, which is the introduction of the type keyword for imports that are only used for typing reasons. This would be beneficial for people reading ... More on discuss.python.org
🌐 discuss.python.org
8
October 4, 2025
Use type keyword for defining NewTypes in Non-Generic types - Ideas - Discussions on Python.org
Now type aliases for Non-generic types are almost useless, like the one showed in the PEP 484 Url = str def retry(url: Url, retry_count: int) -> None: ... With the modern syntax, we would have: type Url = str def retry(url: Url, retry_count: int) -> None: ... Which won’t do anything in static ... More on discuss.python.org
🌐 discuss.python.org
0
February 7, 2024
Are you using types in Python ?
Yes, I use type hints extensively. It helps with autocompletion and let's you catch bugs before you even run the code. lt is also much easier to use a 3rd party module if functions/methods are annotated, since you know what kinds of arguments they expect from you. More on reddit.com
🌐 r/Python
386
383
October 22, 2023
🌐
Python documentation
docs.python.org › 3 › library › typing.html
typing — Support for type hints
1 week ago - The argument list must be a list of types, a ParamSpec, Concatenate, or an ellipsis (...). The return type must be a single type. If a literal ellipsis ... is given as the argument list, it indicates that a callable with any arbitrary parameter list would be acceptable: def concat(x: str, y: str) -> str: return x + y x: Callable[..., str] x = str # OK x = concat # Also OK · Callable cannot express complex signatures such as functions that take a variadic number of arguments, overloaded functions, or functions that have keyword-only parameters.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-type-function
type() function in Python - GeeksforGeeks
The type() function in Python tells what kind of data an object is or creates a new class dynamically.
Published   January 14, 2026
🌐
W3Schools
w3schools.com › python › ref_func_type.asp
Python type() Function
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training ... a = ('apple', 'banana', 'cherry') b = "Hello World" c = 33 x = type(a) y = type(b) z = type(c) Try it Yourself »
Find elsewhere
🌐
Python.org
discuss.python.org › ideas
Introduce type keyword for type only imports - Ideas - Discussions on Python.org
October 4, 2025 - After the great work of everyone involved in PEP 810, I would like to propose a new idea that is similar and somewhat changes a bit of the PEP itself, which is the introduction of the type keyword for imports that are only used for typing reasons. This would be beneficial for people reading the code to understand that the import is only there for type checking reasons, and it will not ever be evaluated, similar to lazy imports proposed in PEP 810, but the code won’t ever need to do the reificat...
🌐
FastAPI
fastapi.tiangolo.com › python-types
Python Types Intro - FastAPI
Then you can declare a variable to be of type Person: ... class Person: def __init__(self, name: str): self.name = name def get_person_name(one_person: Person): return one_person.name ... Notice that this means "one_person is an instance of the class Person". It doesn't mean "one_person is the class called Person". Pydantic is a Python library to perform data validation.
🌐
Python.org
discuss.python.org › ideas
Use type keyword for defining NewTypes in Non-Generic types - Ideas - Discussions on Python.org
February 7, 2024 - Now type aliases for Non-generic types are almost useless, like the one showed in the PEP 484 Url = str def retry(url: Url, retry_count: int) -> None: ... With the modern syntax, we would have: type Url = str def retry(url: Url, retry_count: int) -> None: ... Which won’t do anything in static analysis: test: str = 'not_an_url' test1 = retry(test) # Doesn't give a static warning test = 'not_an_url' test2 = retry(test) # Doesn't give a warning, but may be nice based on --strict test: Url ...
🌐
Mathspp
mathspp.com › blog › til › type-statement-and-type-aliases
TIL #084 – type statement and type aliases | mathspp
Python 3.12 introduced the soft keyword type, which is used in the type statement to create type aliases.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-keywords
Python Keywords - GeeksforGeeks
December 3, 2025 - Data Types · Interview Questions ... Flask · Last Updated : 3 Dec, 2025 · Keywords in Python are special reserved words that are part of the language itself....
🌐
Real Python
realpython.com › python-keywords
Python Keywords: An Introduction – Real Python
February 12, 2025 - The built-in functions and types are also always available, but they aren’t as restrictive as the keywords in their usage. An example of something you can’t do with Python keywords is assign something to them. If you try, then you’ll get a SyntaxError. You won’t get a SyntaxError if ...
🌐
Toppr
toppr.com › guides › python-guide › references › methods-and-functions › methods › built-in › type › python-type
Python type() function | What is a type() function in Python? |
July 14, 2021 - Python type() is a built-in function that returns the type of the data elements stored in any data type or returns a new type object depending on the arguments passed to the function. The Python type() function prints what type of data structures are used to store the data elements in a program.
🌐
YouTube
youtube.com › watch
Python Keywords an Introduction - YouTube
Every programming language has special reserved words, or keywords, that have specific meanings and restrictions around how they should be used. Python is no...
Published   April 14, 2022
🌐
Real Python
realpython.com › python312-typing
Python 3.12 Preview: Static Typing Improvements – Real Python
October 21, 2023 - Python has more than thirty such reserved words, including def, class, and return. A soft keyword is a keyword that’s only reserved in certain contexts. Normally, type refers to the built-in type() function.
🌐
Python
peps.python.org › pep-0484
PEP 484 – Type Hints | peps.python.org
It is possible to declare the return type of a callable without specifying the call signature by substituting a literal ellipsis (three dots) for the list of arguments: def partial(func: Callable[..., str], *args) -> Callable[..., str]: # Body · Note that there are no square brackets around the ellipsis. The arguments of the callback are completely unconstrained in this case (and keyword ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-type
Python type() Function Explained | DigitalOcean
June 6, 2025 - You can also use type(name, bases, dict) to dynamically create new custom classes, specify their base classes (which can also be other custom classes), and define their attributes and methods. Python’s type() function is an important tool for understanding the precise nature of objects and for advanced scenarios involving the dynamic construction of classes.
🌐
Python
docs.python.org › 3 › library › types.html
types — Dynamic type creation and names for built-in types
1 week ago - When initialized with keyword arguments, those are directly added to the underlying namespace. Alternatively, when initialized with a positional argument, the underlying namespace will be updated with key-value pairs from that argument (either a mapping object or an iterable object producing key-value pairs). All such keys must be strings. The type is roughly equivalent to the following code:
🌐
Python documentation
docs.python.org › 3 › library › stdtypes.html
Built-in Types — Python 3.14.3 documentation
1 week ago - >>> encoded_str_to_bytes = 'Python'.encode() >>> type(encoded_str_to_bytes) <class 'bytes'> >>> encoded_str_to_bytes b'Python' Changed in version 3.1: Added support for keyword arguments.