Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion data attributes override method attributes?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jayden  
View profile  
 More options Sep 25 2012, 9:41 am
Newsgroups: comp.lang.python
From: Jayden <jayden.s...@gmail.com>
Date: Tue, 25 Sep 2012 06:41:43 -0700 (PDT)
Local: Tues, Sep 25 2012 9:41 am
Subject: data attributes override method attributes?
Dear All,

In the Python Tutorial, Section 9.4, it is said that

"Data attributes override method attributes with the same name."

But in my testing as follows:

#Begin
class A:
        i = 10
        def i():
                print 'i'

A.i
   <unbound method A.i>
#End

I think A.i should be the number 10 but it is the method. There must be something I misunderstand. Would you please tell me why?

Thanks,

Jayden


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.