Closed Bug 732761 Opened 12 years ago Closed 12 years ago

pymake: add __repr__() methods to more data types

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mhagger, Assigned: mhagger)

Details

(Whiteboard: [pymake])

Attachments

(1 file)

Several data types do not have __repr__() methods, meaning that when instances are printed, the generic Python implementation is used:

$ cat >Makefile
all:
	@echo $(shell foo)
$ ./mkparse.py Makefile
Parsing Makefile
Rule Exp<Makefile:1:0>('all'): Exp<Makefile:1:0>('')
Command <Expansion with elements: ['@echo ', <pymake.functions.ShellFunction object at 0x9f9834c>]>

So add __repr__() methods to some data classes to provide more informative output.  See attached patch.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [pymake]
Comment on attachment 602691 [details] [diff] [review]
Patch to add __repr__() methods to StringExpansion, Function, VariableRef, and SubstitutionRef

Requesting review on behalf of Michael.
Attachment #602691 - Flags: review?
Attachment #602691 - Flags: review? → review?(benjamin)
Attachment #602691 - Flags: review?(benjamin) → review+
c-n, preferrably to the pymake repo in prep of next merge-to-m-c, or at a worse case the b-s branch
Assignee: nobody → mhagger
Keywords: checkin-needed
the pymake repo only for now. The imports into the main tree aren't that important.
http://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/rev/7a758e6ccf47

Also, please use mq for future patches to make checking in on your behalf easier. Thanks!
https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Status: NEW → RESOLVED
Closed: 12 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: