Hello,
PEP 257 says that docstrings should be written in a prescriptive way (i.e.
using the imperative mood) instead of a descriptive way (indicative mood).
This seems like a rather odd recommendation. Since the docstring is
supposed to tell the programmer *how* to use a function/method, I've alwa
And this looks like a homework problem, too.
It is against etiquette to just ask for the solution to homework on ANY
forum, message board, or mailing list. Since it's been given to you as
homework, you're supposed to give it enough thoughts, and (hopefully) come
up with your solution.
Even when y
That's left as an exercise to the reader.
On Friday, August 31, 2012, Mark Lawrence wrote:
> On 31/08/2012 08:55, Alan Gauld wrote:
>
>>
>> Now just translate that into Scheme :-)
>>
>> HTH
>>
>>
> Anyone know of an application to automate Python to Scheme translation? :)
>
> --
> Cheers.
>
> Mar
On 18 November 2012 07:40, Alan Gauld wrote:
> On 16/11/12 17:40, Unaiza Ahsan wrote:
>
>> There is a function created for histogram equalization of images (called
>> *histeq*), and saved in imtools.py.
>
>
>
> from PIL import Image
> from numpy import *
> im = array(Image.open('Tulips
On 15 January 2013 05:19, Prasad, Ramit wrote:
>
> Matthew Ngaha wrote:
> > hey guys, this is not really a Python question. When ever im doing a
> > tutorial, it could be pygame or some gui application, i usually find
> > everything straight forward until the demonstration involves drawing.
> > Th
Dear Sunil,
No method or function in Python has a *static* return type. That's
because Python is by nature a dynamic language, with duck typing and
dynamic dispatch. In fact, any method or function may well return any
of a number of different types:
def crazy_function(return_int)
if r