Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anirudhg07/python-decorator
https://github.com/anirudhg07/python-decorator
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anirudhg07/python-decorator
- Owner: AnirudhG07
- Created: 2024-01-04T10:45:46.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-06T18:25:16.000Z (10 months ago)
- Last Synced: 2024-02-06T19:37:30.156Z (10 months ago)
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The '@' decorator in python
In python we have various symbols and operators. Out of these, there is a veyr famous symbol '@', which has a variety of usage in python code.
In the files above we I have put various examples on how to use the '@' decorator.
Uses of `@`:
1) As an operator of Matrix multiplication
2) In object-oriented programming, making usage of instanced and methods very convenient
3) To create wrapper function,used to give properties to another function. Refer '@'_basics for this.
In Object Oriented Programming, we mainly see the usage of `@property`. Refer property@ for more detail.# args and kwargs
You must have seen the usage of *args and **kwargs in little advanced python coding, for example while coding AI models,etc. In the above file rleated to args and kwargs we see what these are and how they play a very convenient role
in python coding.