-
-
Notifications
You must be signed in to change notification settings - Fork 672
Closed
Description
Python has low-level operations for strings and we should allow them for words. For example
sage: sage: s = "ma maman est magique"
sage: s.split(' ')
['ma', 'maman', 'est', 'magique']
sage: s.split('ma')
['', ' ', '', 'n est ', 'gique']
The patch implements split and partition for words
sage: w = Word("ma maman est magique")
sage: w.split(' ')
[word: ma, word: maman, word: est, word: magique]
sage: w.split('ma')
[word: , word: , word: , word: n est , word: gique]
CC: @seblabbe @sagetrac-sage-combinat
Component: combinatorics
Keywords: string, word
Author: Vincent Delecroix
Reviewer: Sébastien Labbé
Merged: sage-4.3.3.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/8127