Alan Gauld wrote:
>
> "Allen Fowler" wrote
>
>> Are there any utilities to help "spell check" source code?
>> (Docstrings, etc)
>
> I used to have an emacvs script that could do it for C/C++ using
> the vanilla Unix spell program. Unfiortunately I can't remember its name
> but a hunt around the
if you're on windows, notepad++ has a spell check feature in it using aspell
On Mon, Jun 1, 2009 at 7:50 PM, Alan Gauld wrote:
>
> "Allen Fowler" wrote
>
> Are there any utilities to help "spell check" source code? (Docstrings,
>> etc)
>>
>
> I used to have an emacvs script that could do it fo
"Allen Fowler" wrote
Are there any utilities to help "spell check" source code? (Docstrings,
etc)
I used to have an emacvs script that could do it for C/C++ using
the vanilla Unix spell program. Unfiortunately I can't remember its name
but a hunt around the e,macs web sites might throw up a
"Kent Johnson" wrote
> We can fake the Delphi style by using a default constructor and then
> just
> calling the "constructors" after initialisation:
> But its two lines not one... :-(
Why not this?
class C:
def __init__(self): pass
@staticmethod
def LoadFromFile(fname, count):
c
"Kent Johnson" wrote
But its two lines not one... :-(
Why not this?
class C:
def __init__(self): pass
@staticmethod
def LoadFromFile(fname, count):
c = C()
# init c from the file
return c
and similar for Create(). Client code is one line:
c = C.LoadFromFile(fn, cnt)
Kent
Hello,
Are there any utilities to help "spell check" source code? (Docstrings, etc)
Thank you,
:)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Mon, Jun 1, 2009 at 3:55 PM, Alan Gauld wrote:
>
> "W W" wrote
>
>> class C:
>>> @constructor
>>> def LoadFromFile(fname, count): ...
>>> @constructor
>>> def Create(valueTuple):...
>>>
>>> Personally I prefer the Delphi style sincve it makes the constructor
>>> call explicit and adds
On Mon, Jun 1, 2009 at 4:55 PM, Alan Gauld wrote:
> We can fake the Delphi style by using a default constructor and then just
> calling the "constructors" after initialisation:
>
> class C:
> def __init__(): pass
> @constructor
> def LoadFromFile(fname, count): ...
> �...@c
"W W" wrote
class C:
@constructor
def LoadFromFile(fname, count): ...
@constructor
def Create(valueTuple):...
Personally I prefer the Delphi style sincve it makes the constructor
call explicit and adds to the documentation.
Alan G
That does make it problematic... although I sup
On Mon, Jun 1, 2009 at 8:59 AM, Alan Gauld wrote:
>
> "W W" wrote
>
> ( Multiple constructors (or factory methods) is one feature I would like
>>> to see added to Python! )
>>>
>>
>> Wouldn't it be possible to create sort of a... bastardization? i.e.
>>
>> def __init__(self, *args):
>> if len
Chris,
Thanks for your well-written reply. Your analogy to the
complexities of other special methods is well noted. I'll accept
the "small price for flexibility" that you note, if necessary.
However, I still desire a cleaner solution.
I can examine the inherited slots to see which sp
"W W" wrote
( Multiple constructors (or factory methods) is one feature I would
like
to see added to Python! )
Wouldn't it be possible to create sort of a... bastardization? i.e.
def __init__(self, *args):
if len(args) == 0:
#do something
if len(args) == 1:
#do somethin
On Mon, Jun 1, 2009 at 2:27 AM, Alan Gauld wrote:
>
> "Kent Johnson" wrote
>
>> > Yesterday, I posted a question to python-list involving custom
>> > deepcopies in an inheritance hierarchy. I haven't received any
>>
>> ISTM that in general B.__deepcopy__() should call A.__deepcopy__() to do
>> th
"Kent Johnson" wrote
> Yesterday, I posted a question to python-list involving custom
> deepcopies in an inheritance hierarchy. I haven't received any
ISTM that in general B.__deepcopy__() should call
A.__deepcopy__() to do the "A" part of the work. In your example,
this won't work because
"Allen Fowler" wrote
In terms of in-code documentation of function / section headers,
change logs, etc. Are there well-done sample files I can use
as inspiration?
The standard library. Much of it is written in Python and the
documentation is designed to play well with Pythons help() func
15 matches
Mail list logo