On Sep 27, 6:15 am, wxjmfa...@gmail.com wrote:
> The interesting point or my question.
> Why a Python beginner arrives here and should ask about this?
Would you prefer that they'd instead make some kind of false
assumption and then post endless screeds condemning it?
--
http://mail.python.org/mai
Le mardi 25 septembre 2012 16:44:05 UTC+2, Jayden a écrit :
> In learning Python, I found there are two types of classes? Which one are
> widely used in new Python code? Is the new-style much better than old-style?
> Thanks!!
Use Python 3 and classes.
---
The interesting point or my ques
In article <2e8a9e88-9e7e-43f7-a070-ea9054e62...@googlegroups.com>,
Jayden wrote:
> In learning Python, I found there are two types of classes? Which one are
> widely used in new Python code? Is the new-style much better than old-style?
> Thanks!!
If you're just learning Python 2.x, you might
On Tuesday, 25 September 2012 20:14:05 UTC+5:30, Jayden wrote:
> In learning Python, I found there are two types of classes? Which one are
> widely used in new Python code? Is the new-style much better than old-style?
> Thanks!!
Next time just Google your questions.
:-)
Good luck with Python
--
On 25/09/2012 17:20, Steven D'Aprano wrote:
On Tue, 25 Sep 2012 07:44:04 -0700, Jayden wrote:
In learning Python, I found there are two types of classes? Which one
are widely used in new Python code?
New-style classes.
Is the new-style much better than old-style?
Yes.
Always use new-styl
On Tue, 25 Sep 2012 07:44:04 -0700, Jayden wrote:
> In learning Python, I found there are two types of classes? Which one
> are widely used in new Python code?
New-style classes.
> Is the new-style much better than old-style?
Yes.
Always use new-style classes, unless you have some specific re
On Wed, Sep 26, 2012 at 12:44 AM, Jayden wrote:
> In learning Python, I found there are two types of classes? Which one are
> widely used in new Python code? Is the new-style much better than old-style?
> Thanks!!
Definitely go with new-style. In Python 3, old-style classes aren't
supported, an
On 9/25/2012 8:44 AM, Jayden wrote:
In learning Python, I found there are two types of classes? Which one are
widely used in new Python code? Is the new-style much better than old-style?
Thanks!!
Perhaps this is useful:
http://docs.python.org/reference/datamodel.html
It's 3.3 I think.
--
Ta
Steven
Regrettably I have to reply to your post because it misses the point of
my initial post completely. I suggested that Eric Raymond's advice
provided cover for people who were rude, hostile or arrogant. There are
two obvious responses: his advice does not provide such cover or it
does
On Sat, 08 Dec 2007 23:14:44 +, Bruce Coram wrote:
>> http://www.catb.org/~esr/faqs/smart-questions.html
>>
> Eric Raymond's advice on how to ask questions the smart way would seem
> to provide an excuse for people with ego control problems to indulge
> themselves at the expense of others.
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Nigel Rantor <[EMAIL PROTECTED]> wrote:
>
>> I think what Boris was being exceedingly unhelpful in saying was "why
>> should it work when you're calling methods that do not exist"
>>
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
En Fri, 02 Nov 2007 08:58:32 -0300, gert <[EMAIL PROTECTED]> escribió:
> Could not one of you just say "@staticmethod" for once damnit :)
Do we have to read your mind now? You miss-typed the method names the
first time. You could equally have forgotten to type the 'self' parameter.
Don't you
In article <[EMAIL PROTECTED]>,
Nigel Rantor <[EMAIL PROTECTED]> wrote:
>
>I think what Boris was being exceedingly unhelpful in saying was "why
>should it work when you're calling methods that do not exist"
http://www.catb.org/~esr/faqs/smart-questions.html
--
Aahz ([EMAIL PROTECTED])
On Nov 2, 4:04 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
> gert wrote:
> > Could not one of you just say "@staticmethod" for once damnit :)
>
> I did, did I not ?
i am sorry, yes you did :)
--
http://mail.python.org/mailman/listinfo/python-list
gert wrote:
> Could not one of you just say "@staticmethod" for once damnit :)
>
why were you asking if you knew the answer?
yeesh
--
http://mail.python.org/mailman/listinfo/python-list
gert wrote:
> Could not one of you just say "@staticmethod" for once damnit :)
>
I did, did I not ?
--
http://mail.python.org/mailman/listinfo/python-list
Wildemar Wildenburger wrote:
> Bjoern Schliessmann wrote:
>> No, since everyone's crystal balls are in repair.
>
> I don't even have crystal balls!
Not many are rich *and* impotent. :)
Regards,
Björn
--
BOFH excuse #14:
sounds like a Windows problem, try calling Microsoft support
--
http
On Nov 2, 2:10 pm, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:
> Bjoern Schliessmann wrote:
> > gert wrote:
> >> Could not one of you just say "@staticmethod" for once damnit :)
>
> > No, since everyone's crystal balls are in repair.
>
> I don't even have crystal balls!
>
> /W
lol
--
http:/
Bjoern Schliessmann wrote:
> gert wrote:
>> Could not one of you just say "@staticmethod" for once damnit :)
>
> No, since everyone's crystal balls are in repair.
>
I don't even have crystal balls!
/W
--
http://mail.python.org/mailman/listinfo/python-list
gert wrote:
> oops the code is like this but doesn't work
For sake of the god of your choice, please always provide runnable
code as well as hints to
- what you think it should do
- what you want it to do
- what exact error message(s) you get
NOT just "it doesn't work".
Regards,
Björn
--
gert wrote:
> Could not one of you just say "@staticmethod" for once damnit :)
No, since everyone's crystal balls are in repair.
Regards,
Björn
--
BOFH excuse #256:
You need to install an RTFM interface.
--
http://mail.python.org/mailman/listinfo/python-list
Could not one of you just say "@staticmethod" for once damnit :)
--
http://mail.python.org/mailman/listinfo/python-list
gert wrote:
> On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
>> gert wrote:
>>> class Test(object):
>>> def execute(self,v):
>>> return v
>>> def escape(v):
>>> return v
>>> if __name__ == '__main__':
>>> gert = Test()
>>> print gert.m1('1')
>>> pri
gert wrote:
[...]
Why doesn't this new style class work in python 2.5.1 ?
>>> why should it ?
>> I don't know I thought it was supported from 2.2?
>
> oops the code is like this but doesn't work
>
> class Test(object):
>
> def m1(self,v):
> return v
>
> def m2(v):
>
gert wrote:
> oops the code is like this but doesn't work
>
> class Test(object):
>
> def m1(self,v):
> return v
>
> def m2(v):
> return v
>
> if __name__ == '__main__':
> gert = Test()
> print gert.m1('1')
> print Test.m2('2')
>
Well, what do you think:
> "gert" == gert <[EMAIL PROTECTED]> writes:
gert> Why doesn't this new style class work in python 2.5.1 ?
Whether you declare your class as a new style class or an old style
class, your code is completely and utterly broken. Calling non-existing
methods has never been a good way of getting t
gert wrote:
> On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
>> gert wrote:
>>> class Test(object):
>>> def execute(self,v):
>>> return v
>>> def escape(v):
>>> return v
>>> if __name__ == '__main__':
>>> gert = Test()
>>> print gert.m1('1')
>>> pri
gert wrote:
> On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
>> gert wrote:
>>> class Test(object):
>>> def execute(self,v):
>>> return v
>>> def escape(v):
>>> return v
>>> if __name__ == '__main__':
>>> gert = Test()
>>> print gert.m1('1')
>>> pri
On Nov 2, 12:31 pm, gert <[EMAIL PROTECTED]> wrote:
> On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
>
>
>
> > gert wrote:
> > > class Test(object):
>
> > > def execute(self,v):
> > > return v
>
> > > def escape(v):
> > > return v
>
> > > if __name__ == '__main
On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
> gert wrote:
> > class Test(object):
>
> > def execute(self,v):
> > return v
>
> > def escape(v):
> > return v
>
> > if __name__ == '__main__':
> > gert = Test()
> > print gert.m1('1')
> > print Test.m
gert wrote:
> class Test(object):
>
> def execute(self,v):
> return v
>
> def escape(v):
> return v
>
> if __name__ == '__main__':
> gert = Test()
> print gert.m1('1')
> print Test.m2('2')
>
> Why doesn't this new style class work in python 2.5.1 ?
>
why s
31 matches
Mail list logo