Re: [sage-devel] Re: UniqueRepresentation inheritance and __classcall__
Because it is not a public method and nobody added the automethod to the class to make sure it is included. That is my guess. Should be simple to fix. Best, Travis On Friday, September 27, 2019 at 8:42:43 PM UTC+10, Salvatore Stella wrote: > > Indeed it seems to be documented. Why is this not in the online > documentation? > S. > > > * Travis Scrimshaw > [2019-09-26 > 17:59:38]: > > >There is also an example of this inheritance and discussion in one of the > >sage.structure.unique_representation examples. > > > >Best, > >Travis > > > > > >On Friday, September 27, 2019 at 10:57:52 AM UTC+10, Travis Scrimshaw > wrote: > >> > >> > >> The prototype does, now I have to implement the real thing. > > Is there any way to add this info to the documentation? It took me a > lot > of > trial and error to figure out how to do what I wanted. > S. > > Definitely. The topical place would be in > sage.misc.classcall_metaclass, > >>> since that is the module that implements the __classcall__ mechanism. > >>> That's also the documentation you find when you google "__classcall__" > >>> (once you convince google you don't want the results for __call__). > >>> > >> > >> This is actually documented. The problem is the > >> ClasscallMetaclass.__call__ is not in the online documentation (in some > >> sense, Google does know better :P). > >> > >> Best, > >> Travis > >> > >> > > > >-- > >You received this message because you are subscribed to the Google Groups > "sage-devel" group. > >To unsubscribe from this group and stop receiving emails from it, send an > email to sage-...@googlegroups.com . > >To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/ef937635-dbf2-4e7e-ab85-6ef5c8a24335%40googlegroups.com. > > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/aa7bc5e5-97b3-4be1-9a5c-09726bac4602%40googlegroups.com.
[sage-devel] Re: How to recover from total git screwup?
Here is how to reproduce the git problem at least to some extent: king@klap:~$ mkdir gittest king@klap:~$ cd gittest king@klap:~/gittest$ mkdir A king@klap:~/gittest$ cd A king@klap:~/gittest/A$ git init Initialized empty Git repository in /home/king/gittest/A/.git/ king@klap:~/gittest/A$ touch file1 king@klap:~/gittest/A$ git add file1 king@klap:~/gittest/A$ git commit -m "First" [master (root-commit) 64e0df0] First 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 file1 king@klap:~/gittest/A$ git worktree add -b foobar ../B master Preparing ../B (identifier B) HEAD is now at 64e0df0 First king@klap:~/gittest/A$ touch file2 king@klap:~/gittest/A$ git add file 2 fatal: pathspec 'file' did not match any files king@klap:~/gittest/A$ git add file2 king@klap:~/gittest/A$ git commit -m "Second" [master abd4169] Second 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 file2 king@klap:~/gittest/A$ git branch -d foobar Deleted branch foobar (was 64e0df0). king@klap:~/gittest/A$ cd ../B king@klap:~/gittest/B$ git log fatal: your current branch 'foobar' does not have any commits yet king@klap:~/gittest/B$ git status On branch foobar Initial commit Changes to be committed: (use "git rm --cached ..." to unstage) new file: file1 king@klap:~/gittest/B$ ls file1 I believe it is a bug that git allowed me the "git branch -d foobar" operation. If someone knowing where to report a git bug agrees that it is a bug, please go ahead. But now comes a surprise: king@klap:~/gittest/B$ git checkout -b new_foobar master Switched to a new branch 'new_foobar' king@klap:~/gittest/B$ git status On branch new_foobar nothing to commit, working directory clean king@klap:~/gittest/B$ ls file1 file2 That's really a surprise. So, I tried the same in my Sage git repository. Unfortunately it was not successful: $ git checkout -b t/28414/p_group_cohomology_in_PY3 t/28414/p_group_cohomology_in_py_3 ... ... Please, commit your changes or stash them before you can switch branches. Aborting I wonder what's different. I am still reluctant to do "git checkout -f ", but perhaps that would be my best bet. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/qmnepk%245cg8%241%40blaine.gmane.org.