-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.json
More file actions
213 lines (213 loc) · 7.99 KB
/
Copy pathpost.json
File metadata and controls
213 lines (213 loc) · 7.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"post": {
"id": "t3_1uuuf9c",
"title": "Will PEP 505 ever be accepted?",
"author": {
"username": "philtrondaboss",
"id": "t2_8k02pahq"
},
"score": 11,
"upvote_ratio": 0.535483870967742,
"num_comments": 190,
"created": "2026-07-12T23:04:35.157000+0000",
"body": "https://peps.python.org/pep-0505/ I don't understand how null safe operators are less like plain English than other implemented features like the walrus operator. In my opinion, the member access operator would make python significantly easier to read and understand. Here's an example: f = foo() if f is None: baz = \"\" else: baz = f.bar() baz = foo()?.bar() ?: \"\" EDIT: I forgot that \"and\" and \"or\" can be sometimes used in place of \"?.\" and \"?:\" if the left value is not False, '', 0, [], or {}. It's a very implicit null check and has a lot of unexpected behavior.",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/will_pep_505_ever_be_accepted/",
"external_url": null,
"domain": "self.Python",
"is_locked": null,
"is_removed": null
},
"comments": [
{
"id": "t1_ox6854j",
"parent_id": null,
"depth": 0,
"score": 256,
"author": {
"username": "disposepriority",
"id": null
},
"body": "Just my two cents, I enjoy my occasional python though it's not my primary language and that looks very unpythonic in my eyes. Most certainly not easier to read in any way, though I am a verbose/explicit code preference kinda guy.",
"created": "2026-07-12T23:10:38.774000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox6854j/",
"replies": [
{
"id": "t1_ox693jc",
"parent_id": "t1_ox6854j",
"depth": 1,
"score": 58,
"author": {
"username": "Vietname",
"id": null
},
"body": "I'm mainly a python dev but my main secondary language is JS, and im just fine keeping this out of python. It's useful when im writing JS, but its hard to parse when im reading someone else's code compared to the more verbose python equivalent.",
"created": "2026-07-12T23:16:01.012000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox693jc/",
"replies": []
},
{
"id": "t1_ox6eipg",
"parent_id": "t1_ox6854j",
"depth": 1,
"score": 35,
"author": {
"username": "Smallpaul",
"id": null
},
"body": "Any new syntax looks non-Pythonic until it’s been in Python for 5 years.",
"created": "2026-07-12T23:46:46.239000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox6eipg/",
"replies": []
}
]
},
{
"id": "t1_ox8iug8",
"parent_id": null,
"depth": 0,
"score": 99,
"author": {
"username": "runawayasfastasucan",
"id": null
},
"body": "baz = foo()?.bar() ?: \" This monstrosity is not why I code python.",
"created": "2026-07-13T08:33:30.709000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox8iug8/",
"replies": []
},
{
"id": "t1_ox6f0xr",
"parent_id": null,
"depth": 0,
"score": 60,
"author": {
"username": "BeamMeUpBiscotti",
"id": null
},
"body": "The walrus operator was really controversial, the creator of Python pushed it through but afterwards stepped down and handed control of the language over to a steering council. So that is to say, the walrus operator was a one-time thing and it's not possible for null-safe operators to follow the same path to get into the language. At this point, after 10 years of bikeshedding and arguing in circles, I don't think anyone has the desire/political capital to get it over the finish line.",
"created": "2026-07-12T23:49:38.514000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox6f0xr/",
"replies": []
},
{
"id": "t1_ox69282",
"parent_id": null,
"depth": 0,
"score": 59,
"author": {
"username": "sausix",
"id": null
},
"body": "We have that functionality basically. It's a bit off standard and you have to be aware about the object's reported bool state. baz = f and f.bar() or \"\" Of course it's not beginner friendly but once you know about the magic behind and and or then you love it.",
"created": "2026-07-12T23:15:48.376000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox69282/",
"replies": [
{
"id": "t1_ox69s39",
"parent_id": "t1_ox69282",
"depth": 1,
"score": 68,
"author": {
"username": "Designer-Ad-2136",
"id": null
},
"body": "Or i'd do: baz = \"\" if f is None else f.bar()",
"created": "2026-07-12T23:19:53.618000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox69s39/",
"replies": []
},
{
"id": "t1_ox69v9u",
"parent_id": "t1_ox69282",
"depth": 1,
"score": 27,
"author": {
"username": "Due_Campaign_9765",
"id": null
},
"body": "Now chain 5 of them.",
"created": "2026-07-12T23:20:22.679000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox69v9u/",
"replies": []
}
]
},
{
"id": "t1_oxcjb8d",
"parent_id": null,
"depth": 0,
"score": 21,
"author": {
"username": "Koen1999",
"id": null
},
"body": "Less lines of code does not necessarily mean it's easier to read.",
"created": "2026-07-13T20:45:38.036000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/oxcjb8d/",
"replies": []
},
{
"id": "t1_ox6bb2p",
"parent_id": null,
"depth": 0,
"score": 20,
"author": {
"username": "shadowdance55",
"id": null
},
"body": "Explicit is better than implicit. And in the wold where there is less and less code written by hand, terse and potentially non-obvious syntax it's becoming a liability rather than asset.",
"created": "2026-07-12T23:28:29.847000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox6bb2p/",
"replies": []
},
{
"id": "t1_ox8lq3p",
"parent_id": null,
"depth": 0,
"score": 8,
"author": {
"username": "cottonycloud",
"id": null
},
"body": "It should actually be baz = foo()?.bar() ?? '' ?: is the ternary operator while ?? is the null-coalescing operator.",
"created": "2026-07-13T08:58:07.126000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox8lq3p/",
"replies": []
},
{
"id": "t1_ox67qs3",
"parent_id": null,
"depth": 0,
"score": 16,
"author": {
"username": "IlliterateDumbNerd",
"id": null
},
"body": "In my opinion, I hope not, though I can see why you would think that this would be a good idea",
"created": "2026-07-12T23:08:25.160000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox67qs3/",
"replies": []
},
{
"id": "t1_ox6mjjf",
"parent_id": null,
"depth": 0,
"score": 5,
"author": {
"username": "FrickinLazerBeams",
"id": null
},
"body": "God I wish they'd stop changing python.",
"created": "2026-07-13T00:33:17.440000+0000",
"permalink": "https://www.reddit.com/r/Python/comments/1uuuf9c/comment/ox6mjjf/",
"replies": []
}
],
"comments_returned": 13,
"_meta": {
"source": "svc-comments+post-page",
"sort": "top",
"pages_fetched": 2,
"truncated": true
}
}