go-python / go-python/gpython

Implement string format method

Aberta
#116 4 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Go
Estrelas
1k
Forks
105
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## python
```
>>> a = 'alpha'
>>> b = 'bravo'
>>> d = 'delta'
>>> origin = '{} {} charlie {}'
>>> new = origin.format(a, b, d)
>>> print(new)
alpha bravo charlie delta
>>> print(origin)
{} {} charlie {}
>>>
```

## gpython
```
>>> a = 'alpha'
>>> b = 'bravo'
>>> d = 'delta'
>>> origin = '{} {} charlie {}'
>>> new = origin.format(a, b, d)
Traceback (most recent call last):
File "", line 1, in
FIXME line of source goes here
AttributeError: "'str' has no attribute 'format'"
>>> print(new)
Traceback (most recent call last):
File "", line 1, in
FIXME line of source goes here
NameError: "name 'new' is not defined"
>>> print(origin)
{} {} charlie {}
>>>
```

Attribute error occured using string.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.