Skip to content

Conversation

@rocky
Copy link
Member

@rocky rocky commented Jan 3, 2023

from PredefinedConstant.

Doc strings have been over.

This includes some of the stuff from #691. I think there is a little other stuff from that which should go in. But this narrows the differences.

from PredefinedConstant.

Doc strings have been over.
return operator

precedence = prec.value
precedence = prec.value if hasattr(prec, "value") else 0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Value has been removed from Symbol, so is a workaround #691 I think handles this better, but other than fixing things so that we don't call this routine when it shouldn't be called I don't recall the details

@mmatera I think you had the key insight here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rocky, maybe it would be better to set the default to 670 (which is the default for precedence).

Copy link
Member Author

@rocky rocky Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 means no parenthesis ever. 670 adds a parenthesis for everything except Get <<.

So restating, are you sure we want parenthesis most of the time?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, in that case, let's keep 0...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In another PR we may add a constant named "NEVER_ADD_PARENTHESIS". There was more refactoring oef the parenthesize function going on in #691

@rocky
Copy link
Member Author

rocky commented Jan 4, 2023

I will let this sit for a day, and if there are no comments or objections, I'll merge.

@mmatera
Copy link
Contributor

mmatera commented Jan 4, 2023

Regarding this PR, I agree that Symbols should not have a "value" property.

Copy link
Contributor

@mmatera mmatera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the comment, LGTM

@rocky rocky merged commit e80d74f into master Jan 4, 2023
@rocky rocky deleted the Symbol-init-cleanup-revised branch January 4, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants