Python Forum
Does @ at sign used for tother than decorators?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does @ at sign used for tother than decorators?
#1
I have simple example for decorator usage which is straightforward to understand:
def print_fcn_name(func):
        def wrapper():
            print("Something is happening before the function is called.")
            func()
            print("Something is happening after the function is called.")
        return wrapper


@print_fcn_name
def f1():
    print("this is f1...")

f1()
But I am seeing what seems usage other than decorator, for example, following statement I just can not get it:
Do I see it is calling previously defined decorator function called triton.autotune?
@triton.autotune(
    configs=[
        <data definitions1>
    ] if torch.version.hip is None else [
        <data definitions2>
    ],
    key=['M', 'N', 'K'],
)
buran write Oct-12-2023, 09:02 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Reply


Messages In This Thread
Does @ at sign used for tother than decorators? - by ggpython000 - Oct-12-2023, 08:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Decorators @ annotation drcl 3 635 Feb-24-2024, 06:12 AM
Last Post: Gribouillis
  Need to sign JWT token with JWK key stucoder 1 1,864 Feb-21-2022, 09:04 AM
Last Post: stucoder
  i making a terminal sign up website thing Kenrichppython 1 1,805 Nov-04-2021, 03:57 AM
Last Post: bowlofred
  Variable Scopes Decorators oclmedyb 6 2,908 Jan-15-2021, 02:13 PM
Last Post: oclmedyb
  Style question on adherence to PEP 8 with whitespace near an "=" sign nilesh 6 4,236 Jan-12-2021, 11:11 PM
Last Post: snippsat
  Decorators and return statements JonEdward 2 2,065 Jul-24-2020, 05:02 PM
Last Post: JonEdward
  Syntax Error with = sign and more Kathleen57 3 2,810 May-03-2020, 03:52 AM
Last Post: buran
  How to print cache from Decorators with Memoization OlgaM 2 2,197 Jan-29-2020, 05:06 PM
Last Post: OlgaM
  Python decorators. dodiko1d 0 11,730 Oct-13-2019, 10:23 AM
Last Post: dodiko1d
  Handling pound sign (#) within custom URL chisox721 5 6,881 Apr-02-2019, 10:01 PM
Last Post: chisox721

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020