It's not a keyword, neither in C nor Python. It's just a way to indicate that it is logically a type/class, rather than a function or method slot or the like. type is a built-in class in Python (all Python classes are instances of type, directly or indirectly), but it's not a reserved keyword; you could name a variable type if you wanted (though you'd cut off access to the original type within that scope).

In the absolute most modern versions of Python (3.12+), type is technically a "soft keyword" (meaning it's only a keyword in a specific narrow syntactic context, but usable arbitrarily elsewhere) used to enable lazy evaluation for types used in type annotations, but that usage came long after the docs began using type to indicate class types.

Answer from ShadowRanger 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

PEP 695 – Type Parameter Syntax
I do really like this pep and I think it has grounds for making python a lot better for typing. The only thing i dislike is the type keyword. Doesn’t feel pythonic More on reddit.com
🌐 r/Python
56
123
June 3, 2023
Is it safe to use the python word "type" in my code? - Stack Overflow
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. ... Sign up to request clarification or add additional context in comments. ... Neither. It's not a reserved word (a list of which can be found at http://docs.python... 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
Top answer
1 of 2
6

It's not a keyword, neither in C nor Python. It's just a way to indicate that it is logically a type/class, rather than a function or method slot or the like. type is a built-in class in Python (all Python classes are instances of type, directly or indirectly), but it's not a reserved keyword; you could name a variable type if you wanted (though you'd cut off access to the original type within that scope).

In the absolute most modern versions of Python (3.12+), type is technically a "soft keyword" (meaning it's only a keyword in a specific narrow syntactic context, but usable arbitrarily elsewhere) used to enable lazy evaluation for types used in type annotations, but that usage came long after the docs began using type to indicate class types.

2 of 2
2

What appears as type means different things depending on whether you're looking at documentation intended for C or Python.


The documentation source you're looking at is at cpython/Doc/c-api/type.rst, where it is written as c:type:: PyTypeObject. This is for C code, and is Sphinx syntax, which is documented here:

.. c:type:: typedef-like declaration
.. c:type:: name

Describes a C type, either as a typedef, or the alias for an unspecified type.

This indicates that PyTypeObject is either a name of a C typedef or some existing struct.


If you see type XYZ in docs intended for Python code, it would actually be py:type: in the documentation source, which only refers to the name of a Python type alias, and never the name of a class.

What is rendered as type XYZ mirrors the type statement declaration syntax, and here, in Python source code type is actually a soft keyword.

🌐
Python documentation
docs.python.org › 3 › library › typing.html
typing — Support for type hints
Parameter specification variables created with covariant=True or contravariant=True can be used to declare covariant or contravariant generic types. The bound argument is also accepted, similar to TypeVar. However the actual semantics of these keywords are yet to be decided.
🌐
W3Schools
w3schools.com › python › python_ref_keywords.asp
Python Keywords
Python has a set of keywords that are reserved words that cannot be used as variable names, function names, or any other identifiers.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-type-function
type() function in Python - GeeksforGeeks
type() returns the exact type of an object. It accepts either one or three arguments. The three-argument form is mainly used in advanced Python programming. For checking whether an object belongs to a class or its subclasses, isinstance() is ...
Published: July 29, 2026
Find elsewhere
🌐
Reddit
reddit.com › r/python › pep 695 – type parameter syntax
r/Python on Reddit: PEP 695 – Type Parameter Syntax
June 3, 2023 - So having two keywords which are synonyms in the general sense should still be avoided IMO. Also, is the distinction between types and classes in computer science really that clear? I would say that most people consider the terms interchangeable. Even in Python, type(thing) is equivalent to thing.__class__.
🌐
The Python Coding Book
thepythoncodingbook.com › home › blog › using type hints when defining a python function [intermediate python functions series #6]
Using type hints when defining a Python function
March 19, 2023 - Type hints indicate that the data the function returns is a list of strings. Therefore the IDE “knows” that item should be a str in the final for loop since result is a list of strings. The IDE warns you that append() is not a string method. Opinions are split in the Python community on how and when you should use type hinting.
🌐
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.
🌐
W3Schools
w3schools.com › python › ref_func_type.asp
Python type() Function
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Training ... a = ('apple', 'banana', 'cherry') b = "Hello World" c = 33 x = type(a) y = type(b) z = type(c) Try it Yourself »
🌐
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...
🌐
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 retr…
🌐
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
Data Types · Interview Questions · Examples · Quizzes · DSA Python · Data Science · NumPy · Pandas · Practice · Django · Flask · Last Updated : 19 Sep, 2026 · Keywords are special reserved words that are part of the language itself.
Published: 2 weeks ago
🌐
Real Python
realpython.com › python-keywords
Python Keywords: An Introduction – Real Python
May 22, 2026 - 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 you try to assign something to a built-in function or type, but it still isn’t a good idea.
🌐
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 - In Python, we do not explicitly ... built-in type() function. Python type() is a built-in function that is used to print the type of function parameters based on the arguments passed to it....
🌐
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
July 29, 2026 - 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
To facilitate the declaration of container types where covariant or contravariant type checking is acceptable, type variables accept keyword arguments covariant=True or contravariant=True. At most one of these may be passed. Generic types defined with such variables are considered covariant or contravariant in the corresponding variable.