Stack Exchange
log in
users (7)
rooms (10)
faq
gerrit
general
recent
conversations
Python
Room rules:
sopython.com/chatroom
Code formatting guide:
tinyu...
10
gerrit
Dec 16, 2021 16:26
is also allowed
gerrit
Dec 16, 2021 16:26
[a, b] = [1, 2]
gerrit
Dec 16, 2021 16:26
I forgot that
gerrit
Dec 16, 2021 16:20
@Kevin Ah yes, spaces. I forgot, thanks for the link.
gerrit
Dec 16, 2021 16:19
what is the correct markdown syntax to write code in chat? I forgot.
gerrit
Dec 16, 2021 16:19
```python
(a, b) = [1, 2]
```
gerrit
Dec 16, 2021 16:18
with
a = ()
it,s a tuple, but the left hand side of (a, b) = [1, 2] looks like a tuple, but does any object of type tuple get created? I believe not.
gerrit
Dec 16, 2021 16:17
I think they call it sequence unpacking in the Python tutorial.
gerrit
Dec 16, 2021 16:16
Is it actually a tuple, though? On the left hand side?
gerrit
Dec 16, 2021 16:16
or with some actual function: () = g(), where g is a generator, to make sure it's empty.
gerrit
Dec 16, 2021 16:14
I find it interesting that this is valid Python syntax:
() = ()
(but I don't know the chat-compatible markdown to write it as code here)
gerrit
Nov 25, 2020 13:57
@cs95 It didn't happen.
gerrit
Jan 24, 2020 12:42
I propose that, to be more animal friendly, we replace the metasyntactic variables "spam" and "eggs" by "tofu" and "quinoa", respectively.
gerrit
Oct 31, 2019 13:30
Apparently
Python has an official emoji expert
.
gerrit
Nov 1, 2017 17:18
@WayneWerner Who reads the introduction to the library reference anyway?
gerrit
Nov 1, 2017 13:10
@WayneWerner That bit is still in today
docs.python.org/3/library/intro.html
gerrit
Oct 31, 2017 21:41
I don't know about properties.
gerrit
Oct 31, 2017 21:41
If you make sure you don't store any state in 'self' you can do it, but most objects do have state.
gerrit
Oct 31, 2017 21:40
@wim I tried to use it on methods, but 'self' is usually mutable, and using it with mutable arguments is a recipe for trouble
gerrit
Oct 31, 2017 21:40
@wim Be very careful about that.
gerrit
Oct 31, 2017 21:13
"The keys of dictionaries are no longer restricted to strings"
gerrit
Oct 31, 2017 21:06
History (Python 1.2 Tutorial):
ir.cwi.nl/pub/5009/05009D.pdf
5
gerrit
Jul 18, 2017 16:35
The only illegal symbol in an identifier I've ever wanted to use is β
gerrit
Jul 18, 2017 16:32
Until Unicode accepts the
combining heart above proposal
, it will fail.
gerrit
Jul 18, 2017 16:26
https://chat.stackoverflow.com/transcript/message/38189434#38189434
Thank you kind stranger, the upvote should prevent the question from being deleted as abandoned :)
gerrit
Jul 18, 2017 14:23
Quite puzzled that
this Python bug
has been around for 3 years, been reported since 6 months, makes warnings very cumbersome to use, yet nobody but me appears interested :-/ (
SO question on workaround got me a tumbleweed
)
Sandbox
Where you can play with regular chat features (except flagging...
4
gerrit
Oct 31, 2019 08:38
This is cruel.
Discussion on answer by recnac: Why d
…
Imported from a comment discussion on
stackoverflow.com/questi...
gerrit
Apr 16, 2019 00:27
@SukumarRdjf Please don't ever use this "trick".
Python Documentation
For discussion relevant to
stackoverflow.com/documentation/pyt...
gerrit
Jul 21, 2016 16:12
Are there any guidelines on when documentation is βtoo specificβ? For example, my proposed example was rejected:
stackoverflow.com/documentation/proposed/changes/…
LoveOverflow
gerrit
Jun 29, 2015 14:22
πππ
gerrit
Jun 29, 2015 14:12
Google also celebrates stuff.
gerrit
Jun 29, 2015 14:11
π π π!