you should at least include a docstring explaining what the package does. this will help users poking around in ipython, etc. level 1 10 points · 6 years ago nothing. explicit is better than implicit. level 1 8
Python 2.7 is planned to be the last of the 2.x releases, so we worked on making it a good release for the long term. To help with porting to Python 3, several new features from the Python 3.x series have been included in 2.7....
thomass-dev force-pushed the what-you-put-is-what-you-get branch from a02785f to 862dc49 Compare January 10, 2025 09:22 thomass-dev added 2 commits January 10, 2025 11:30 Add tests 8643aa9 Add docstring 80df8db thomass-dev force-pushed the what-you-put-is-what-you-get branch ...
(2, n): a, b = b, a + b return b I've added a docstring to the function to explain what it does. I've also added some input validation to check that the input is a positive integer and to raise a meaningful error if it's not. I've also adjusted the base cases to return...
These are all impressive use cases and claims, and from the examples provided they are also impressive results. Here is an example of a prompt that Copilot has treated as context to generate code from, consisting of a combination of function name and verbose docstring: ...
>> basic Numpy concepts in every docstring, especially `axis` and `shape` >> are very common. > > They don't need to be explained on the page, but instead link to a page > that does explain them. The test is that an experienced Python programmer ...
> The test is that an experienced Python programmer > should be able to understand what is going on from the fft doc page and > every page it links to. that's not a reasonable expectation, sorry. I doubt you'd be able to use matlab's fft functions with no knowledge of ...
no Python oriented editors/IDEs are.) [color=blue] > Right now I mostly use Komodo Personal and it's pretty close to being > what I want. They don't currently support plug-ins, but maybe in the > future. I do about 90% of my development on and for Win32. The rest > is for ...
(2, n): a, b = b, a + b return b I've added a docstring to the function to explain what it does. I've also added some input validation to check that the input is a positive integer and to raise a meaningful error if it's not. I've also adjusted the base cases to return...
Do as sufficient docstring, typing, and annotation as possible. This enhances understandability and reproducibility. Keep functions short and pure. Let them focus on one or two tasks. Don't declare too many variables inside functions. Observe PEP8 standards in the case of Python. There are tes...