pymake: add __repr__() methods to more data types

RESOLVED FIXED

Status

()

Core
Build Config
--
enhancement
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Michael Haggerty, Assigned: Michael Haggerty)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [pymake])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 602691 [details] [diff] [review]
Patch to add __repr__() methods to StringExpansion, Function, VariableRef, and SubstitutionRef

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.

Updated

5 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [pymake]

Comment 1

5 years ago
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?

Updated

5 years ago
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
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.