Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7812703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:35:59+00:00 2026-06-02T04:35:59+00:00

I have a descriptor class ReferredItem(): def __init__(self, method): self.method = method def __get__(self,

  • 0

I have a descriptor

class ReferredItem(): 
    def __init__(self, method):
        self.method = method

    def __get__(self, obj, objtype):
        ...

I use it as decorator:

class MyClass():

    @ReferredItem
    some_method(self):
        ...

I’ve seen the decorators are lower case. But classes should be named in camel case.

Should i name the class like referred_item? Or leave it as it is now?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:36:02+00:00Added an answer on June 2, 2026 at 4:36 am

    PEP8 states that

    Almost without exception, class names use the CapWords convention.

    without explaining what the exceptions are, but in the standard library, classes that are most commonly used as functions usually follow the function naming convention. E.g. itertools.groupby is actually a class, but you don’t notice that in ordinary usage; it’s an implementation detail and groupby could be rewritten as an actual function.

    You can adopt a similar style by using the all-lowercase decorator naming convention for classes used as decorators: referred_item, not ReferredItem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following code: class MyCustomDescriptor: def __init__(self,foo): self._foo = foo def __call__(self,decorated_method): #
I have an object now: class Items attr_accessor :item_id, :name, :description, :rating def initialize(options
I become use raw socket and i have this problem: bad file descriptor the
I'd like to have the following setup: class Descriptor { public string Name {
I have a descriptor class for a couple of domain classes. The descriptor class
In C++ I have a constructor that accepts an object of class descriptor .
I have Man class which also has 2 variable : description and name. At
I have a model item public class EntryInputModel { ... [Required(ErrorMessage = Description is
in a Model I have a CharField with choices: class MyModel(models.Model): THE_CHOICES=( ('val',_(u'Value Description')),
I have a server application that writes to a popen(myCommand, w) file descriptor in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.