#26651 closed enhancement (fixed)

py3: fix repr of callable dict

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.5
Component: python3 Keywords:
Cc: tscrim Merged in:
Authors: Frédéric Chapoton Reviewers: David Coudert, Vincent Klein
Report Upstream: N/A Work issues:
Branch: 3ec238b (Commits) Commit: 3ec238bcdcfad77aa8bf9d5477c15feb03d1aadc
Dependencies: Stopgaps:

Description

and therefore also the doctest in combinat/ranker.py

Change History (10)

comment:1 Changed 13 months ago by chapoton

  • Branch set to u/chapoton/26651
  • Commit set to 151ac1caa4956bc51db4c227c38b79585165a8ee
  • Status changed from new to needs_review

New commits:

151ac1cpy3: fix __repr__ of callable dict

comment:2 Changed 13 months ago by chapoton

  • Cc tscrim added

green bot, please review

comment:3 Changed 13 months ago by vklein

  • Owner changed from (none) to vklein

comment:4 Changed 13 months ago by dcoudert

The tests block of method __call__ contains:

            sage: from sage.misc.callable_dict import CallableDict
            sage: from sage.combinat.words.morphism import CallableDict

is it to show that it is possible to import from different places or is it just a mistake ?

comment:5 Changed 13 months ago by vklein

If the goal is to show that it can be imported from different places with doctests, maybe a more explicit code will be better. For example :

sage: from sage.misc.callable_dict import CallableDict as CDict
sage: d1 = CDict({1: 'a', 3: 'b', 2: 'c'})
sage: from sage.combinat.words.morphism import CallableDict
sage: d2 = CallableDict({1: 'a', 3: 'b', 2: 'c'})
sage: d1 == d2
True

comment:6 Changed 13 months ago by vklein

  • Owner changed from vklein to (none)

comment:7 Changed 13 months ago by git

  • Commit changed from 151ac1caa4956bc51db4c227c38b79585165a8ee to 3ec238bcdcfad77aa8bf9d5477c15feb03d1aadc

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

3ec238btrac 26651 fix imports

comment:8 Changed 13 months ago by chapoton

fixed, this was just a mistake.

comment:9 Changed 13 months ago by vklein

  • Reviewers set to David Coudert, Vincent Klein
  • Status changed from needs_review to positive_review

Looks good to me.

comment:10 Changed 13 months ago by vbraun

  • Branch changed from u/chapoton/26651 to 3ec238bcdcfad77aa8bf9d5477c15feb03d1aadc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.