Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let attrcall objects accept further arguments #7842

Closed
nthiery opened this issue Jan 4, 2010 · 7 comments
Closed

Let attrcall objects accept further arguments #7842

nthiery opened this issue Jan 4, 2010 · 7 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Jan 4, 2010

The attached patch allows for the following:

            sage: xseries = attrcall('series', x)
            sage: xseries(sin(x), 4)
            1*x + (-1/6)*x^3 + Order(x^4)

This is used in #7753

CC: @sagetrac-sage-combinat

Component: misc

Keywords: attrcall

Author: Nicolas M. Thiéry

Reviewer: Mike Hansen

Merged: sage-4.3.1.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/7842

@nthiery nthiery added this to the sage-4.3.1 milestone Jan 4, 2010
@nthiery nthiery self-assigned this Jan 4, 2010
@nthiery
Copy link
Contributor Author

nthiery commented Jan 4, 2010

Attachment: trac_7842-attrcall-nt.patch.gz

@mwhansen
Copy link
Contributor

mwhansen commented Jan 4, 2010

comment:2

Another nice thing to have now that I think about it would be this syntax:

sage: xseries = attrcall.series(x)
sage: xseries(sin(x), 4)
1*x + (-1/6)*x^3 + Order(x^4)

I'll make a new ticket for this so that that it'll backward-compatible with the old version.

@nthiery
Copy link
Contributor Author

nthiery commented Jan 4, 2010

comment:3

Replying to @mwhansen:

Another nice thing to have now that I think about it would be this syntax:

sage: xseries = attrcall.series(x)
sage: xseries(sin(x), 4)
1*x + (-1/6)*x^3 + Order(x^4)

Your point is that this syntax gives a better visual hint about this being about method calls, right? So here, attrcall would be some sort of dummy object placeholder? Why not. Though I am a bit reluctant with having two syntaxes.

I'll make a new ticket for this so that that it'll backward-compatible with the old version.

Do you mind reviewing this first, so that we can get #7753 in?

I'll review your patch in return :-)

@mwhansen
Copy link
Contributor

mwhansen commented Jan 4, 2010

comment:4

This patch looks good to me.

We should also maybe allow putting keywords in too at the "second stage".

@mwhansen
Copy link
Contributor

mwhansen commented Jan 4, 2010

Reviewer: Mike Hansen

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 13, 2010

Merged: 4.3.1.alpha2

@rlmill rlmill mannequin removed the s: positive review label Jan 13, 2010
@rlmill rlmill mannequin closed this as completed Jan 13, 2010
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jan 13, 2010

Changed merged from 4.3.1.alpha2 to sage-4.3.1.alpha2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants