01: package org.python.core;
02:
03: public abstract class PyDescriptor extends PyObject {
04:
05: protected PyType dtype;
06: protected String name;
07:
08: protected PyException call_wrongtype(PyType objtype) {
09: return Py.TypeError("descriptor '" + name + "' requires '"
10: + dtype.fastGetName() + "' object but received a '"
11: + objtype.fastGetName() + "'");
12: }
13:
14: protected PyException get_wrongtype(PyType objtype) {
15: return Py.TypeError("descriptor '" + name + "' for '"
16: + dtype.fastGetName() + "' objects doesn't apply to '"
17: + objtype.fastGetName() + "' object");
18: }
19:
20: protected String blurb() {
21: return "descriptor '" + name + "' of '" + dtype.fastGetName()
22: + "' object";
23: }
24:
25: }
|