* [devel] python3
@ 2012-04-04 6:16 REAL
2012-04-04 7:37 ` Sergei Epiphanov
2012-04-04 7:42 ` Sergei Epiphanov
0 siblings, 2 replies; 4+ messages in thread
From: REAL @ 2012-04-04 6:16 UTC (permalink / raw)
To: ALT Linux Team development discussions
Привет!
Пните меня куда-нибудь, пожалуйста, насчёт просветления.
$ python -c "from string import join"
[отработало успешно]
$ python3 -c "from string import join"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name join
--
REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [devel] python3
2012-04-04 6:16 [devel] python3 REAL
@ 2012-04-04 7:37 ` Sergei Epiphanov
2012-04-04 7:42 ` Sergei Epiphanov
1 sibling, 0 replies; 4+ messages in thread
From: Sergei Epiphanov @ 2012-04-04 7:37 UTC (permalink / raw)
To: ALT Linux Team development discussions
On 4 апреля 2012 13:16 REAL wrote:
> Привет!
>
> Пните меня куда-нибудь, пожалуйста, насчёт просветления.
>
> $ python -c "from string import join"
> [отработало успешно]
>
> $ python3 -c "from string import join"
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: cannot import name join
В python3 нет join, есть str.join(seq),
где str - любая строка
seq - последовательность
--
С уважением, Епифанов Сергей
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [devel] python3
2012-04-04 6:16 [devel] python3 REAL
2012-04-04 7:37 ` Sergei Epiphanov
@ 2012-04-04 7:42 ` Sergei Epiphanov
2012-04-04 7:46 ` REAL
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Epiphanov @ 2012-04-04 7:42 UTC (permalink / raw)
To: ALT Linux Team development discussions
On 4 апреля 2012 13:16 REAL wrote:
> $ python3 -c "from string import join"
Забыл добавить. Строки теперь входят в базовый набор питона, а модуль string
оставлен только для отдельных функций и для строковых констант. Все функции
переведены в класс str.
Попробуйте
python3 -c 'help(str)'
--
С уважением, Епифанов Сергей
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [devel] python3
2012-04-04 7:42 ` Sergei Epiphanov
@ 2012-04-04 7:46 ` REAL
0 siblings, 0 replies; 4+ messages in thread
From: REAL @ 2012-04-04 7:46 UTC (permalink / raw)
To: ALT Linux Team development discussions
04.04.2012 14:42, Sergei Epiphanov пишет:
>> $ python3 -c "from string import join"
>
> Забыл добавить. Строки теперь входят в базовый набор питона, а модуль string
> оставлен только для отдельных функций и для строковых констант. Все функции
> переведены в класс str.
>
> Попробуйте
>
> python3 -c 'help(str)'
Спасибо!
--
REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-04 7:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04 6:16 [devel] python3 REAL
2012-04-04 7:37 ` Sergei Epiphanov
2012-04-04 7:42 ` Sergei Epiphanov
2012-04-04 7:46 ` REAL
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git