File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -863,7 +863,7 @@ Also handles C++ lambda capture by reference."
863
863
(defun electric-operator-python-mode-in-lambda-args? ()
864
864
" Are we inside the arguments statement of a lambda?"
865
865
; ; \\ (\\ s-\\ |^\\ ) instead of just \\ b because otherwise foo_lambda matches
866
- (electric-operator-looking-back-locally " \\ (\\ s-\\ |^\\ )lambda[^:]*" ))
866
+ (electric-operator-looking-back-locally " \\ (\\ s-\\ |^\\ )lambda\\ s- [^:]*" ))
867
867
868
868
(defun electric-operator-python-mode-: ()
869
869
" Handle python dict assignment"
Original file line number Diff line number Diff line change @@ -164,10 +164,18 @@ Feature: Python mode basics
164
164
When I type "foolambdabar=1"
165
165
Then I should see "foolambdabar = 1"
166
166
167
+ Scenario : Lambda at the start of another word doesn't affect spacing
168
+ When I type "lambdabar=1"
169
+ Then I should see "lambdabar = 1"
170
+
167
171
Scenario : Lambda inside another word with _ doesn't affect spacing
168
172
When I type "foo_lambdabar=1"
169
173
Then I should see "foo_lambdabar = 1"
170
174
175
+ Scenario : Zero argument lambda
176
+ When I type "lambda: x, y=1"
177
+ Then I should see "lambda: x, y = 1"
178
+
171
179
# Slice operator
172
180
Scenario : Don't space : inside slices
173
181
When I type "a[1:2]"
You can’t perform that action at this time.
0 commit comments