msg283580 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-19 04:45 |
The current description is "The name BaseClassName must be defined in a scope containing the derived class definition", which did not conform to the actual situation ,e.g. the base class object is not in the same scope as the derived class. |
|
|
msg283581 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-19 04:46 |
The associated link is https://docs.python.org/3.6/tutorial/classes.html#inheritance |
|
|
msg283596 - (view) |
Author: Brendan Donegan (brendan-donegan) * |
Date: 2016-12-19 08:38 |
Hi. Can you please provide a small code snippet illustrating where this diverges from the actual behaviour? |
|
|
msg283621 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-19 13:15 |
Code: >class A(object): pass 'object' is not in the same scope as 'A' |
|
|
msg283622 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2016-12-19 13:20 |
It is part of the global scope, which contains all other scopes. (I'm not 100% sure I'm comfortable with that language, but it doesn't seem obviously wrong.) |
|
|
msg283623 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-19 14:00 |
The previous description about scope classify it into 3 types explicitly, which means the scope containing the current module's global names is not same as the scope containing built-in names. |
|
|
msg283663 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-20 03:48 |
If i was wrong about this issue, please tell me. |
|
|
msg283666 - (view) |
Author: Brendan Donegan (brendand) |
Date: 2016-12-20 04:38 |
IMO there's no actual bug in Python. Perhaps documentation can be clarified in a short simple way. I would reiterate the point that restating facts of the language all over the documentation is not a great idea, but maybe here the benefits outweigh the drawbacks. Anyway I think the bug is clear now (it's a docs issue if anything) so I'd leave it open until someone offers a patch or a strong argument why it shouldn't be clarified. On Tue, 20 Dec 2016 at 09:18 woo yoo <report@bugs.python.org> wrote: > > woo yoo added the comment: > > If i was wrong about this issue, please tell me. > > ---------- > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue29010> > _______________________________________ > |
|
|
msg283667 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-20 05:18 |
I agree with you |
|
|
msg283691 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2016-12-20 14:35 |
Would it make it clearer if we said "BaseClassName must be defined in a namespace accessible from the scope containing the dervied class definition" ? |
|
|
msg283694 - (view) |
Author: Brendan Donegan (brendan-donegan) * |
Date: 2016-12-20 14:49 |
Worth putting them side by side I think: "The name BaseClassName must be defined in a scope containing the derived class definition" vs. "BaseClassName must be defined in a namespace accessible from the scope containing the derived class definition" |
|
|
msg283696 - (view) |
Author: woo yoo (woo yoo) |
Date: 2016-12-20 14:57 |
As for me, i prefer the new description, which is clear and easy to understand. |
|
|