Opened 8 years ago

Closed 2 years ago

#10261 closed enhancement (fixed)

Improve documentation for word (over str vs over integer)

Reported by: slabbe Owned by: slabbe
Priority: major Milestone: sage-6.4
Component: documentation Keywords: sd75
Cc: tmonteil Merged in:
Authors: Sébastien Labbé Reviewers: Thierry Monteil
Report Upstream: N/A Work issues:
Branch: 97dada0 (Commits) Commit: 97dada02f2d195de689f870e2db13f2e546e2e75
Dependencies: Stopgaps:

Description (last modified by slabbe)

As noticed by Florent Hivert here, the following two objects :

sage: w = Word('010120')
sage: z = Word([0, 1, 0, 1, 2, 0])

have the same string representation :

sage: w
word: 010120
sage: z
word: 010120

but are not equal :

sage: w == z
False

Indeed, w and z are defined on different alphabet :

sage: w[2]
'0'
sage: z[2]
0

Documentation about this should be improved.

Also that url looks very bad: http://doc.sagemath.org/html/en/reference/combinat/sage/combinat/words/__init__.html

which is referenced from http://doc.sagemath.org/html/en/reference/combinat/index.html

Change History (10)

comment:1 Changed 5 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 4 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 2 years ago by slabbe

  • Description modified (diff)

comment:6 Changed 2 years ago by slabbe

  • Keywords sd75 added

I am cleaning my old trac tickets during Sage Days 75.

comment:7 Changed 2 years ago by slabbe

  • Authors set to Sébastien Labbé
  • Branch set to u/slabbe/10261
  • Cc tmonteil added
  • Commit set to 4c5e509b2950267684ad14607e5e1a4729024f81
  • Status changed from new to needs_review

New commits:

fe28a5510261: cleaning documentation of main page of combinat/words in reference manual
4c5e50910261: documenting ambiguous representation of words

comment:8 Changed 2 years ago by git

  • Commit changed from 4c5e509b2950267684ad14607e5e1a4729024f81 to 97dada02f2d195de689f870e2db13f2e546e2e75

Branch pushed to git repo; I updated commit sha1. New commits:

68d1a0310261: cleaning documentation of main page of combinat/words in reference manual
97dada010261: documenting ambiguous representation of words

comment:9 Changed 2 years ago by tmonteil

  • Reviewers set to Thierry Monteil
  • Status changed from needs_review to positive_review

Through this way of indexing the contents of the doc via __init__.py files is specific to the combinat section (which leads to weird URLs), the commits fix the issue and the doc is improved.

comment:10 Changed 2 years ago by vbraun

  • Branch changed from u/slabbe/10261 to 97dada02f2d195de689f870e2db13f2e546e2e75
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.