This is the mail archive of the gdb-patches@sourceware.org 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: [RFC - Python Scripting] New method Objfile.symtabs () - docs included


In this patch, you have an iterator that walks over the symtabs for an objfile, but that is only used internally in the symtabs() method which is written to return a list.

How about having symtabs() return the iterator instead?  An iterator is usually just as good as a list (and more efficient); in the rare cases where you actually need the list, simply doing list(objfile.symtabs()) will do that.

	paul


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