Skip to content

Instantly share code, notes, and snippets.

@adngdb
Last active November 30, 2017 14:54
Show Gist options
  • Save adngdb/4634d51f241c2e95d77c85adbdf1e1b5 to your computer and use it in GitHub Desktop.
Save adngdb/4634d51f241c2e95d77c85adbdf1e1b5 to your computer and use it in GitHub Desktop.
# My version:
my_list = [
'hello',
'world',
+ 'what is up?',
]
# vs:
my_list = [
'hello',
- 'world']
+ 'world',
+ 'what is up?']
# ----------------------------------------------------------
# My version:
-def very_long_function_name_with_many_arguments(
+def very_long_function_name_with_even_more_arguments(
hey_i_just_met_you,
and_this_is_crazy,
+ but_here_s_my_number,
):
do_something()
# vs:
-def very_long_function_name_with_many_arguments(hey_i_just_met_you,
+def very_long_function_name_with_even_more_arguments(hey_i_just_met_you,
- and_this_is_crazy):
+ and_this_is_crazy,
+ but_here_s_my_number):
do_something()
# ----------------------------------------------------------
# My version:
search = (
- Something
+ SomethingElse
.objects
.filter()
)
# vs:
search = (
- Something.objects
- .filter()
+ SomethingElse.objects
+ .filter()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment