Incidencia #21809

add :flatten attribute that flatten the nested result list

Abrir Fecha: 2010-05-20 12:38 Última actualización: 2010-05-22 20:49

Informador:
Propietario:
Estado:
Cerrado
Componente:
(Ninguno)
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Accepted
Fichero:
Ninguno

Details

add :flatten attribute that flatten the result list if it's nested. below is the example.

>>> math.sqrt([1, [2, 3]])
[1, [1.41421, 1.73205]]
>>> math.sqrt([1, [2, 3]])]:flatten
[1, 1.41421, 1.73205]

Ticket History (3/4 Histories)

2010-05-20 12:38 Updated by: pxn11432
  • New Ticket "add :flatten attribute that flatten the nested result list" created
2010-05-20 16:20 Updated by: pxn11432
  • Resolución Update from Ninguno to Accepted
2010-05-21 14:48 Updated by: pxn11432
2010-05-22 20:49 Updated by: pxn11432
  • Estado Update from Open to Cerrado
  • Ticket Close date is changed to 2010-05-22 20:49
  • Hito Update from (Ninguno) to build008 (cerrado)
Comentario

:flat attribute was implemented

math.sqrt([1, [2, 3]]):flat
[1, 1.41421, 1.73205]

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Entrar