1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-25 12:34:23 +01:00
wtfpython/CONTRIBUTING.md

45 lines
2.2 KiB
Markdown
Raw Normal View History

2018-01-22 10:12:35 +01:00
All kinds of patches are welcome. Feel free to even suggest some catchy and funny titles for the existing Examples. The goal is to make this collection as interesting to read as possible.
2018-01-23 10:01:44 +01:00
If you are interested in translating the project to another language (some people have done that in the past), please feel free to open up an issue or ping on the [gitter channel](https://gitter.im/wtfpython/Lobby) if you need any kind of help.
2018-01-30 20:38:22 +01:00
If the changes you suggest are significant, filing an issue before submitting the actual patch will be appreciated. If you'd like to work on the issue (highly encouraged), you can mention that you're interested in working on it while creating the issue and get assigned to it.
2017-09-11 18:20:33 +02:00
If you're adding a new example, please do create an issue to discuss it before submitting a patch.
2017-08-31 15:41:20 +02:00
You can use the following template for adding a new example:
2017-08-31 15:43:00 +02:00
<pre>
2018-01-22 12:57:59 +01:00
### ▶ Some fancy Title *
The asterisk at the end of the title indicates the example was not present in the first release and has been recently added.
2017-08-31 15:43:00 +02:00
```py
# Setting up the code.
# Preparation for the magic...
2017-08-31 15:41:20 +02:00
```
2017-08-31 15:43:00 +02:00
**Output (Python version):**
```py
>>> triggering_statement
Probably unexpected output
```
(Optional): One line describing the unexpected output.
#### 💡 Explanation:
* Brief explanation of what's happening and why is it happening.
2017-08-31 15:41:20 +02:00
```py
2017-08-31 15:43:00 +02:00
Setting up examples for clarification (if necessary)
2017-08-31 15:41:20 +02:00
```
2017-08-31 15:43:00 +02:00
**Outupt:**
2017-08-31 15:41:20 +02:00
```py
2017-08-31 15:43:00 +02:00
>>> trigger # some example that makes it easy to unveil the magic
# some justified output
2017-08-31 15:41:20 +02:00
```
```
2017-08-31 15:43:00 +02:00
</pre>
2019-09-13 11:45:31 +02:00
Few things that you can consider while writing an example,
- Try to be consistent with the namings and the values you use with the variables. For instance, most variable names in the project are along the lines of `some_string`, `some_list`, `some_dict`, etc. You'd see a lot of `x`s for single letter variable names, and `"wtf"` as values for strings. There's strictly enforced scheme in the project, but you can take a glance at other examples to get a gist.
- Try to be as creative as possible to add that element of "surprise" in the setting up part of an example. Sometimes this may mean writing a snippet a sane programmer would never write.
- Also, please don't forget to add your name to the [contributors list](/CONTRIBUTING.md).