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
string monoid class one not defined #20009
Comments
Changed branch from u/karandesai-96/string_monoid_class_one_not_defined to none |
Author: Karan Desai |
comment:3
Hi @kcrisman |
Reviewer: Karl-Dieter Crisman |
comment:5
Looks good to me, but I'm not an expert in such things so I'll let those who are give the final review. I will say that you need a docstring and examples... New commits:
|
Commit: |
comment:6
|
Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Thierry Monteil |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
This should do the work.
This makes it a StringMonoidElement, and not a python string. |
comment:9
This does not work. As such it returns the second element of the alphabet, as an element of the string monoid:
What we are looking here is the neutral element for the multiplication, which you can get as You still need to add some doctests. Also, why creating a |
comment:10
The identity element might be required somewhere else, so I thought let it be declared as a member of the class, though for now I'll move it locally. Oh, I didn't think about this happening ! I will fix it in a commit quickly. |
comment:11
Replying to @karandesai-96:
Let me suggest not doing things unless you actually need it, since this make some noise in the source code. Also, since no other monoid has such an attribute, it is likely that if someone once needs something like that, she will create an attribute with another name higher in the hierarchy, and the information will be stored twice. I guess that if someone needs the identity element, she will just call self.one() since it is the standard notation for monoids within Sage. |
comment:13
Replying to @sagetrac-tmonteil: Also, I am new to development for Sage, I want to ask you whether you build Sage completely again to review my code ? Building Sage takes a lot of time on my laptop, how did you manage to test my code ?
|
comment:14
Replying to @karandesai-96:
Since your branch is based on |
comment:15
Hi, Does this ticket need further work ? |
comment:17
@sagetrac-tmonteil @kcrisman A gentle reminder. Is the current work fit to be merged ? This ticket will go stale and sit here as is for long if not reviewed... :/ Please direct me to further needed work if any, I will do it quickly. |
comment:18
It looks much better now. Perhaps could you just replace the current description |
comment:19
Replying to @sagetrac-tmonteil:
Oh yes, this is better. I will push my |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
I added a missing dot, apart from that it is good to go! New commits:
|
Changed branch from u/tmonteil/string_monoid_class_one_not_defined to |
From this ask.sagemath question:
Component: algebra
Author: Karan Desai
Branch/Commit:
e319260
Reviewer: Karl-Dieter Crisman, Thierry Monteil
Issue created by migration from https://trac.sagemath.org/ticket/20009
The text was updated successfully, but these errors were encountered: