This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python pretty-printing [3/6]

On Mon, Apr 06, 2009 at 05:26:06PM -0600, Tom Tromey wrote:
> Daniel> So the constructor does a lookup.  This will be a little weird if we
> Daniel> want to create types from scratch someday (could be very useful).
> At that point we can always make the constructor change its behavior
> depending on the runtime type of the argument.
> t = Type(gdb.STRUCT)  # make a new struct, STRUCT is an int
> t = Type("whatever")  # look up "whatever"

OK, that makes sense.

> Daniel> And what happens if name is not given?
> This is some relic or misconception in the code... the name need not
> be optional.

Let's fix the docs then.

> Daniel> Anyway, I wonder if there shouldn't be an explicit lookup
> Daniel> routine instead.
> I like it ok the way it is.  But, if you really want it changed, I
> will do that; now is not a super time to do this, but it will only be
> harder in the future.  Thiago, what do you think?

Especially if we have to make other incompatible changes now anyway, I'd rather
have a lookup routine for this than a constructor.  But I don't want
to just make work for you.

At some point I know we'll want explicit lookup routines; there's
scope to consider.

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]