Às 20:35 de 07/01/21, Terry Reedy escreveu:
> On 1/7/2021 4:20 AM, Terry Reedy wrote:
>> On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
>>> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>>>
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in t
On 1/7/2021 4:20 AM, Terry Reedy wrote:
On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why
Às 07:29 de 07/01/21, Paulo da Silva escreveu:
> Hi!
>
> Does anybody know why cmd method isn't called when I change the button
> state (clicking on it) in this example?
> I know that this seems a weird class use. But why doesn't it work?
> Thanks.
>
> class C:
> from tkinter import Checkbutt
Às 16:02 de 07/01/21, Peter Otten escreveu:
> On 07/01/2021 08:42, Christian Gollwitzer wrote:
>> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>>
...
>
> I recommend that the OP use a more conventional stye and do the setup
> outside the class or, better, in an instance of the class.
>
There are
Às 09:20 de 07/01/21, Terry Reedy escreveu:
> On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
>> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>>
>>> Does anybody know why cmd method isn't called when I change the button
>>> state (clicking on it) in this example?
>>> I know that this seems a weird
Às 07:42 de 07/01/21, Christian Gollwitzer escreveu:
> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>
>> Does anybody know why cmd method isn't called when I change the button
>> state (clicking on it) in this example?
>> I know that this seems a weird class use. But why doesn't it work?
>> Thanks
On 07/01/2021 08:42, Christian Gollwitzer wrote:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why doesn't it work?
Thanks.
class C:
On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why doesn't it work?
Thanks.
class C:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why doesn't it work?
Thanks.
class C:
from tkinter import Checkbutton
import tkinte
On 11/14/2020 4:09 AM, Manfred Lotz wrote:
On 11 Nov 2020 19:21:57 GMT
r...@zedat.fu-berlin.de (Stefan Ram) wrote:
In my Python course I gave the assignment to define a
counter class "Main" so that
counter0 = Main()
counter1 = Main()
counter1.count(); counter1.count(); counter1.count()
c
On Sat, 14 Nov 2020 05:08:07 -0600
2qdxy4rzwzuui...@potatochowder.com wrote:
> On 2020-11-14 at 10:09:32 +0100,
> Manfred Lotz wrote:
>
> > On 11 Nov 2020 19:21:57 GMT
> > r...@zedat.fu-berlin.de (Stefan Ram) wrote:
> >
> > > In my Python course I gave the assignment to define a
> > > cou
On 2020-11-14 at 10:09:32 +0100,
Manfred Lotz wrote:
> On 11 Nov 2020 19:21:57 GMT
> r...@zedat.fu-berlin.de (Stefan Ram) wrote:
>
> > In my Python course I gave the assignment to define a
> > counter class "Main" so that
> >
> > counter0 = Main()
> > counter1 = Main()
> > counter1.count();
On 11 Nov 2020 19:21:57 GMT
r...@zedat.fu-berlin.de (Stefan Ram) wrote:
> In my Python course I gave the assignment to define a
> counter class "Main" so that
>
> counter0 = Main()
> counter1 = Main()
> counter1.count(); counter1.count(); counter1.count()
> counter1.count(); counter1.count()
On 13/11/2020 08:47, Alan Bawden wrote:
r...@zedat.fu-berlin.de (Stefan Ram) writes:
I expected this solution:
class Main:
def __init__( self ):
self.value = 0
def count( self ):
self.value += 1
but a student turned in the following so
r...@zedat.fu-berlin.de (Stefan Ram) writes:
I expected this solution:
class Main:
def __init__( self ):
self.value = 0
def count( self ):
self.value += 1
but a student turned in the following solution:
class Main:
value = 0
def
On 07Aug2019 16:36, Terry Reedy wrote:
On 8/7/2019 3:26 PM, Manfred Lotz wrote:
On Wed, 07 Aug 2019 14:39:00 -0400
Dennis Lee Bieber wrote:
On Wed, 7 Aug 2019 20:11:15 +0200, Manfred Lotz
declaimed the following:
More often I see something like this:
class Myclass:
...
but sometimes I see
On 8/7/2019 3:26 PM, Manfred Lotz wrote:
On Wed, 07 Aug 2019 14:39:00 -0400
Dennis Lee Bieber wrote:
On Wed, 7 Aug 2019 20:11:15 +0200, Manfred Lotz
declaimed the following:
Hi there,
More often I see something like this:
class Myclass:
...
but sometimes I see
class Myclass(object):
...
On Wed, 07 Aug 2019 14:39:00 -0400
Dennis Lee Bieber wrote:
> On Wed, 7 Aug 2019 20:11:15 +0200, Manfred Lotz
> declaimed the following:
>
> >Hi there,
> >More often I see something like this:
> >
> >class Myclass:
> >...
> >
> >
> >but sometimes I see
> >
> >class Myclass(object):
> >...
> >
>
-Original Message-
From: Barry Scott
Sent: Tuesday, July 16, 2019 11:53 AM
To: Joseph L. Casale
Cc: python-list@python.org
Subject: Re: Class initialization with multiple inheritance
> And here is the MRO for LeftAndRight.
>
> >>> import m
> LeftAndRight.__ini
> On 16 Jul 2019, at 01:13, Joseph L. Casale wrote:
>
> I am trying to find explicit documentation on the initialization logic for a
> Base class when multiple exist. For the example in the documentation at
> https://docs.python.org/3/tutorial/classes.html#multiple-inheritance,
> if Base1 and
On 16/07/19 12:13 PM, Joseph L. Casale wrote:
I am trying to find explicit documentation on the initialization logic for a
Base class when multiple exist. For the example in the documentation at
https://docs.python.org/3/tutorial/classes.html#multiple-inheritance,
if Base1 and Base2 both themselv
On 2019-03-06, Marko Rauhamaa wrote:
> Rhodri James :
>> On 06/03/2019 14:15, Calvin Spealman wrote:
C++ (a language I have no respect for)
>>> This was uncalled for and inappropriate. Please keep discord civil.
>>
>> That was the civil version :-)
>
> C++ is a programming language without fe
Rhodri James :
> On 06/03/2019 14:15, Calvin Spealman wrote:
>>> C++ (a language I have no respect for)
>> This was uncalled for and inappropriate. Please keep discord civil.
>
> That was the civil version :-)
C++ is a programming language without feelings. It's nobody's ethnicity,
sexual orienta
On 06/03/2019 14:44, Chris Angelico wrote:
Ouch, did C++ burn you in the past?
I've tried and failed to learn the language three times. It's been
suggested that my mistake was using Stroustrop's book :-) There just
seem to be so much boilerplate and fiddly bits that it quickly gets too
com
On Thu, Mar 7, 2019 at 1:34 AM Rhodri James wrote:
>
> On 06/03/2019 14:15, Calvin Spealman wrote:
> >> C++ (a language I have no respect for)
> > This was uncalled for and inappropriate. Please keep discord civil.
>
> That was the civil version :-)
>
Ouch, did C++ burn you in the past?
IMO it's
On 06/03/2019 14:15, Calvin Spealman wrote:
C++ (a language I have no respect for)
This was uncalled for and inappropriate. Please keep discord civil.
That was the civil version :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
> C++ (a language I have no respect for)
This was uncalled for and inappropriate. Please keep discord civil.
On Wed, Mar 6, 2019 at 7:12 AM Rhodri James wrote:
> On 05/03/2019 22:39, Milt wrote:
> > The following code gives me unusual results - base on experience with
> C++.
> >
> > class Car:
On 05/03/2019 22:39, Milt wrote:
The following code gives me unusual results - base on experience with C++.
class Car:
# carColor = None
# mileage = None
def __init__(self, color = None, miles = None):
self.mileage = miles
self.carColor = color
def print(self):
On 3/5/2019 6:11 PM, Kevin Hu wrote:
Python is a language with very weak typing,
Python runtime objects are strongly dynamically typed. Their type/class
is one of their attributes. All classes are subclasses of class
'object'. Python names (variables) are untyped in a sense, or one could
On 3/5/19, Kevin Hu wrote:
>
> Python is a language with very weak typing, and it’ll happily shoehorn data
> into variables even when you don’t expect it to.
Python has strong typing, in that it doesn't implicitly coerce
unrelated types in expressions. However, it has no enforced static
typing of
Milt,
On 6/03/19 11:39 AM, Milt wrote:
The following code gives me unusual results - base on experience with C++.
class Car:
# carColor = None
# mileage = None
def __init__(self, color = None, miles = None):
self.mileage = miles
self.carColor = color
def print(self)
I believe for the correct behavior you’ll need:
myCar = Car(color=‘blue’, miles=15000)
myCar = Car(miles=25000, color=‘orange’)
In which case both objects will be initialized as the way you’d expect.
Python is a language with very weak typing, and it’ll happily shoehorn data
into variables ev
On Wed, Mar 6, 2019 at 10:01 AM Milt wrote:
>
> The following code gives me unusual results - base on experience with C++.
> def __init__(self, color = None, miles = None):
>self.mileage = miles
>self.carColor = color
>
> myCar = Car('blue', 15000)
> myCar = Car(25000, 'orange'
Steve D'Aprano writes:
> Good way:
>
> Foreigner speaking English as their second language:
> "Who is the father of this class?"
>
> Native English speaker:
> "The father is 'object', but in English we would normally ask
> 'what is the parent?' instead."
Of the three scenario
On Fri, 8 Sep 2017 07:03 pm, Ben Finney wrote:
>> Who is the father of ExampleClass1 ?
>
> No-one, since classes do not have gender. (The convention is to use the
> gender-neutral “parent” to refer to that relationship.)
Possibly not the case in Russia. Besides, words have gender in many langua
Andrej Viktorovich writes:
> I found several class creation samples:
>
> class ExampleClass1:
>
> class ExampleClass2(object):
>
>
> What is difference between them?
Very little difference.
In Python 3, both create classes that inherit from one other class,
‘object’.
In Python 2, the first cre
On 2017-09-08 10:17, Andrej Viktorovich wrote:
> Hello
>
> I found several class creation samples:
>
> class ExampleClass1:
>
> class ExampleClass2(object):
>
>
> What is difference between them? Who is the father of ExampleClass1 ?
>
In Python 3, unless you've redefined "object", these are
From: Smith
On 06/09/2016 11:23, Peter Otten wrote:
> If so look at
>
>> > ...: def __str__(self):
>> > ...: return "Visitor: %i, Contacts: %i %
>> > (self.visits,self.contacts)"
> once more. Where are the quotes? Where should the be?
>
>
>
I solved the problem.
thank you Pe
On 06/09/2016 11:23, Peter Otten wrote:
> If so look at
>
>> > ...: def __str__(self):
>> > ...: return "Visitor: %i, Contacts: %i %
>> > (self.visits,self.contacts)"
> once more. Where are the quotes? Where should the be?
>
>
>
I solved the problem.
thank you Peter
--
https
On 06/09/2016 11:23, Peter Otten wrote:
If so look at
> ...: def __str__(self):
> ...: return "Visitor: %i, Contacts: %i %
> (self.visits,self.contacts)"
once more. Where are the quotes? Where should the be?
I solved the problem.
thank you Peter
--
https://mail.python
Smith wrote:
> you can help me ?
Yes ;) But you might consider posting on python-tutor instead of python-
list.
> I can not understand where is the error in this script.
It's always a good idea to state both what you expect and what you get
instead explicitly, in plain english.
> In [72]: day
On Thu, Jan 28, 2016 at 9:56 AM, Chris Angelico wrote:
> On Fri, Jan 29, 2016 at 12:56 AM, jmp wrote:
> > My guess is that models.Model has a metclass. Without going too much int
> > details, the metaclass may change the class structure when it's created.
> >
> > django is very specific and very
On 28/01/16 13:15, ast wrote:
hello
Here is a class from django framework
from django.db import models
class Article(models.Model):
titre = models.CharField(max_length=100)
auteur = models.CharField(max_length=42)
contenu = models.TextField(null=True)
date = models.DateTimeField(
On Fri, Jan 29, 2016 at 12:56 AM, jmp wrote:
> My guess is that models.Model has a metclass. Without going too much int
> details, the metaclass may change the class structure when it's created.
>
> django is very specific and very database oriented.
>
> "
> article = Article(titre="Bonjour", aute
"ast" a écrit dans le message de
news:56aa1474$0$27833$426a7...@news.free.fr...
OK, thank you for answer
I didn't studied metaclass yet that's why it is not clear for me.
I have to take a look at that concept first
--
https://mail.python.org/mailman/listinfo/python-list
On 01/28/2016 02:15 PM, ast wrote:
hello
Here is a class from django framework
from django.db import models
class Article(models.Model):
titre = models.CharField(max_length=100)
auteur = models.CharField(max_length=42)
contenu = models.TextField(null=True)
date = models.DateT
In alister
writes:
> why not simply use pythons builtin id function?
> each new instance of an object is automatically assigned a unique ID
It's only guaranteed to be unique for objects that exist at the same time.
If an object is created and destroyed and then another new object is
created,
On Tue, 29 Sep 2015 09:17 pm, Anssi Saari wrote:
[...]
>> The problem is that in python you can't change a class variable through
>> an instance. The moment you try, you create an instance attribute.
>
> That much is clear but why does his other version of __gen_id() work
> (after a fashion)? It
Op 29-09-15 om 13:17 schreef Anssi Saari:
> Antoon Pardon writes:
>
>> Op 29-09-15 om 11:27 schreef ple...@gmail.com:
>>> I have a perplexing problem with Python 3 class variables. I wish to
>>> generate an unique ID each time an instance of GameClass is
>>> created. There are two versions of the
Antoon Pardon writes:
> Op 29-09-15 om 11:27 schreef ple...@gmail.com:
>> I have a perplexing problem with Python 3 class variables. I wish to
>> generate an unique ID each time an instance of GameClass is
>> created. There are two versions of the __gen_id method with test run
>> results for each
On 09/29/2015 01:02 PM, jmp wrote:
class GameObject:
@property
def id(self):
return id(self) #use the builtin id function
print GameObject().id
Cheers,
JM
I should add that until you don't serialize your object you're fine.
If you need to serialize it, you may want to look at
h
On 09/29/2015 11:27 AM, ple...@gmail.com wrote:
I have a perplexing problem with Python 3 class variables.
Your problem is that when assigning values to your class attribute, you
are actually creating a instance attribute.
class Foo:
bar = "I'm a class attribute"
def __init__(self):
Op 29-09-15 om 11:27 schreef ple...@gmail.com:
> I have a perplexing problem with Python 3 class variables. I wish to generate
> an unique ID each time an instance of GameClass is created. There are two
> versions of the __gen_id method with test run results for each listed below
> the code.
Th
On Tue, 29 Sep 2015 02:27:23 -0700, plewto wrote:
> I have a perplexing problem with Python 3 class variables. I wish to
> generate an unique ID each time an instance of GameClass is created.
> There are two versions of the __gen_id method with test run results for
> each listed below the code.
>
I have a perplexing problem with Python 3 class variables. I wish to generate
an unique ID each time an instance of GameClass is created. There are two
versions of the __gen_id method with test run results for each listed below the
code.
Originally I used the version which is now commented out
- Original Message -
> From: Jean-Michel Pichavant
> To: Albert-Jan Roskam
> Cc: Python
> Sent: Tuesday, January 13, 2015 5:37 PM
> Subject: Re: class-based class decorator
>
> - Original Message -
>> From: "Albert-Jan Roskam"
>&
- Original Message -
> From: "Albert-Jan Roskam"
> > From: Jean-Michel Pichavant
> > I don't really understand how you successfuly manage positional
> > parameters,
> > since the caller may not name them.
> > I'm asking because if your intend to check only the keyword
> > parameters,
> >
On Tue, Jan 13, 2015 6:31 AM CET Ian Kelly wrote:
>On Jan 12, 2015 6:47 AM, "Albert-Jan Roskam" wrote:
>> Thanks for your replies. I changed it into a regular decorator (not a class
>> decorator). It would have been even nicer if I only needed to specify it
>> once
- Original Message -
> From: Jean-Michel Pichavant
> To: Albert-Jan Roskam
> Cc: Python
> Sent: Monday, January 12, 2015 4:20 PM
> Subject: Re: class-based class decorator
>
> - Original Message -
>> From: "Albert-Jan Roskam"
>
On Jan 12, 2015 6:47 AM, "Albert-Jan Roskam" wrote:
> Thanks for your replies. I changed it into a regular decorator (not a class
> decorator). It would have been even nicer if I only needed to specify it once
> per class, but, well, in my case this hardly matters. The code below works as
> int
- Original Message -
> From: "Albert-Jan Roskam"
> import functools
> import inspect
> import warnings
>
> warnings.simplefilter("always")
>
> class check_deprecated_args(object):
>
> def __init__(self, deprecated_params, msg=None):
> self.deprecated_params = deprecated_para
- Original Message -
> From: Ian Kelly
> To: Python
> Cc:
> Sent: Saturday, January 10, 2015 7:30 AM
> Subject: Re: class-based class decorator
>
> On Fri, Jan 9, 2015 at 2:26 PM, Albert-Jan Roskam
>
> wrote:
>>
>>
>> Hi,
>&g
On Fri, Jan 9, 2015 at 2:26 PM, Albert-Jan Roskam
wrote:
>
>
> Hi,
>
> I am trying to write a class decorator that checks whether deprecated
> parameters with non-default
>
> arguments are used. More complete code is here: http://pastebin.com/ZqnMis6M.
> In the code below,
>
> how should I modif
On Sat, Jan 10, 2015 at 8:26 AM, Albert-Jan Roskam
wrote:
> I am trying to write a class decorator that checks whether deprecated
> parameters with non-default
>
> arguments are used. More complete code is here: http://pastebin.com/ZqnMis6M.
> In the code below,
>
Any particular reason to make
- Original Message -
> From: "Jean-Michel Pichavant"
> To: "Juan Christian"
> Cc: "Python"
> Sent: Monday, 22 September, 2014 1:37:41 PM
> Subject: Re: Class Inheritance from different module
>
>
> > cl
> class User(Inheritance from API):
> def __init__(self, ID):
> steamapi.core.APIConnection(api_key = KEY)
> super( " Inheritance SteamUser" (ID)) # creates the user using the
> API
>
>
> [...]
>
>
> So that in my code when I need to create a new user, I just call 'usr
> = User("XXX")' ins
Juan Christian wrote:
> I have the following structure:
>
> Third-party API installed via pip:
> steamapi /
> app.py
> consts.py
> core.py
> users.py
> [...]
>
> My script:
> test.py
>
>
> In the API, the module users.py has a class 'SteamUser' and I want to
> mimic it's usage on my code, like
Juan Christian wrote:
[...]
> In the API, the module users.py has a class 'SteamUser' and I want to
> mimic it's usage on my code, like this:
>
> import steamapi
>
> [...]
>
> class User(Inheritance from API):
What do you mean, "Inheritance from API"? You can't inherit from an API,
only from c
On 1/24/2014 3:45 PM, Chris Angelico wrote:
On Sat, Jan 25, 2014 at 7:32 AM, Asaf Las wrote:
On Friday, January 24, 2014 6:37:29 PM UTC+2, Chris Angelico wrote:
On Sat, Jan 25, 2014 at 3:31 AM, Asaf Las wrote:
Hi
Is there way to get list of instances of particular
class through class itself?
Asaf Las Wrote in message:
> On Friday, January 24, 2014 10:45:30 PM UTC+2, Chris Angelico wrote:
>> On Sat, Jan 25, 2014 at 7:32 AM, Asaf Las wrote:
>> > On Friday, January 24, 2014 6:37:29 PM UTC+2, Chris Angelico wrote:
>>
>> >> It's possible to unbind the name, but every instance retains a
On Friday, January 24, 2014 11:18:08 PM UTC+2, Chris Angelico wrote:
> On Sat, Jan 25, 2014 at 8:03 AM, Asaf Las wrote:
> > Chris, i like answers which open doors to my curiosity :-)
> > yet i should spend my credits very carefully :-)
> Trust me, there is no limit to what you can learn when you h
On Sat, Jan 25, 2014 at 8:03 AM, Asaf Las wrote:
> Chris, i like answers which open doors to my curiosity :-)
> yet i should spend my credits very carefully :-)
Trust me, there is no limit to what you can learn when you have that
kind of curiosity! Ask more questions and you'll get more details.
On Friday, January 24, 2014 10:45:30 PM UTC+2, Chris Angelico wrote:
> On Sat, Jan 25, 2014 at 7:32 AM, Asaf Las wrote:
> > On Friday, January 24, 2014 6:37:29 PM UTC+2, Chris Angelico wrote:
> >> On Sat, Jan 25, 2014 at 3:31 AM, Asaf Las wrote:
> >> > Hi
> >> > Is there way to get list of instan
On Sat, Jan 25, 2014 at 7:32 AM, Asaf Las wrote:
> On Friday, January 24, 2014 6:37:29 PM UTC+2, Chris Angelico wrote:
>> On Sat, Jan 25, 2014 at 3:31 AM, Asaf Las wrote:
>> > Hi
>> > Is there way to get list of instances of particular
>> > class through class itself? via metaclass or any other m
Hi Chris
Thanks for answers
On Friday, January 24, 2014 6:37:29 PM UTC+2, Chris Angelico wrote:
> On Sat, Jan 25, 2014 at 3:31 AM, Asaf Las wrote:
> > Hi
> > Is there way to get list of instances of particular
> > class through class itself? via metaclass or any other method?
> Not automatical
On Sat, Jan 25, 2014 at 3:31 AM, Asaf Las wrote:
> Hi
>
> Is there way to get list of instances of particular
> class through class itself? via metaclass or any other method?
Not automatically, but you can make a class that keeps track of its
instances with a weak reference system.
> Another que
On Monday, 6 January 2014 18:14:08 UTC+1, jwe.va...@gmail.com wrote:
> I have problems with these two classes:
>
>
>
> class LPU1():
>
> def __init__(self, formula):
>
> """
>
> formula is a string that is parsed into a SymPy function
>
> and several derived func
jwe.van.d...@gmail.com wrote:
> I have problems with these two classes:
>
> class LPU1():
> def __init__(self, formula):
> """
> formula is a string that is parsed into a SymPy function
> and several derived functions
> """
> self.formula = formula
>
On Mon, 6 Jan 2014 09:14:08 -0800 (PST), jwe.van.d...@gmail.com wrote:
I have problems with these two classes:
class LPU1() :
You forgot to derive from object. That's implied on 3.x, but you say
you're also running on 2.7 Without naming your base class you're
asking for an old style clas
On Tue, Jan 7, 2014 at 4:14 AM, wrote:
> class LPU3(LPU1):
> def __new__(self):
> """
> the same functions as LPU1 but some added functions
> and some functions redefined
> """
You probably don't want to be using __new__ here. Try using __init__
instead, o
On 2013-10-21, Marcin Szamotulski wrote:
> So the process (with some simplifications) goes like this:
>
> 1. get metaclass: meta
> 2. call meta.__prepare__ to get namespace (class __dict__)
> 3. evaluate the class body in the namespace
> 4. call meta with arguemnts: name, bases, na
You can inspect the process in this way:
>>> c = 'class A: pass'
>>> code = compile(c, '', 'exec')
>>> from dis import dis
>>> dis(code)
1 0 LOAD_BUILD_CLASS
1 LOAD_CONST 0 (", line 1>)
4 LOAD_CONST 1 ('A')
7 MAKE_FUN
Piet van Oostrum writes:
> from import * is considered bad practice anyway. It is better just to import
> the things you need.
>
> from pykkar import World, Pykkar, _WorldProper
Or, even better, be explicit:
import pykkar
…
foo = pykkar.World()
--
\ “Computer perspect
markot...@gmail.com writes:
>
> OK so I did a took time of and read the pykkar code through. abd I found that
> there is a third class i have to implement.
[...]
> So I have come up with this code
> from pykkar import *
>
> create_world("""
>
> # #
> # v#
> # #
> #
On 10Oct2013 11:34, markot...@gmail.com wrote:
> OK so I did a took time of and read the pykkar code through. abd
> I found that there is a third class i have to implement.
> This Is the pykkar sourcecode
[... lots and lots of docstring and code ...]
[... and finally a little more messgae ...]
> I
kolmapäev, 9. oktoober 2013 2:55.28 UTC+3 kirjutas Cameron Simpson:
> On 08Oct2013 01:20, wrote:
>
> > I cant just subclassing doesent work. It seem the init method of the source
> > class also calls out another class. And the problem is, i can subclass the
> > other class to with the required
On 10/08/2013 06:24 AM, Steven D'Aprano wrote:
On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
In the following case:
>>> class Foo:
... _Foo__a = 100
... __a = 33
...
>>> Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise
On 10/09/2013 01:00 AM, Oscar Benjamin wrote:
> On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
>
> > Another question is: where is the place in which this transformation
> > occurs? Is it at the parser level, before the dictionary attribute is
> > gave as argument to the metaclass?
On 08Oct2013 01:20, markot...@gmail.com wrote:
> I cant just subclassing doesent work. It seem the init method of the source
> class also calls out another class. And the problem is, i can subclass the
> other class to with the required function but the end result is that it
> doesent work, sin
On Tue, 08 Oct 2013 15:05:26 +0100, wrote:
Parent class is at the link.
Please quote some context when you reply. What link?
Then again, I'm not about to click on some random link someone posts to a
newsgroup. Apart from being one of the classic ways to get a virus onto
my computer, it
On Oct 8, 2013 2:26 PM, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:
>
> On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
>
> > Another question is: where is the place in which this transformation
> > occurs? Is it at the parser level, before the dictionary attribute is
>
On 10/8/13 7:15 AM, Marco Buttu wrote:
Also, as Terry mentions, no one has ever assigned the two names you
show,
Sincerely, I can not now if someone has assigned (or will assegne) in
such way...
If you explain more about what you are building, and where this crops up
as a problem, we can
Parent class is at the link.
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
> In the following case:
>
> >>> class Foo:
> ... _Foo__a = 100
> ... __a = 33
> ...
> >>> Foo._Foo__a
> 33
>
> I think this behavior, for a user who does not know the convention,
> could be a surprise.
Yes, you are correct. It s
On 10/08/2013 01:07 PM, Ned Batchelder wrote:
On 10/8/13 6:13 AM, Marco Buttu wrote:
>>> class Foo:
... _Foo__a = 100
... __a = 33
...
>>> Foo._Foo__a
33
...
You also get a "problem" if you do this:
>>> class Foo:
... a = 100
... a = 33
...
>>> Foo.a
On 10/8/13 6:13 AM, Marco Buttu wrote:
In the following case:
>>> class Foo:
... _Foo__a = 100
... __a = 33
...
>>> Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise. Should be raising an exception (in order to
inform the user the t
On 10/08/2013 12:36 PM, Terry Reedy wrote:
On 10/8/2013 6:13 AM, Marco Buttu wrote:
In the following case:
>>> class Foo:
... _Foo__a = 100
... __a = 33
...
>>> Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise.
No one qualified
On 10/8/2013 6:13 AM, Marco Buttu wrote:
In the following case:
>>> class Foo:
... _Foo__a = 100
... __a = 33
...
>>> Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise.
No one qualified to use such names would do such a thing , so
On 8/10/2013 04:20, markot...@gmail.com wrote:
> I cant just subclassing doesent work.
I can't parse that "sentence."
> It seem the init method of the source class also calls out another
class. And the problem is, i can subclass the other class to with the required
function but the end result i
On 08/10/2013 09:20, markot...@gmail.com wrote:
To whom and to what are you replying?
--
Roses are red,
Violets are blue,
Most poems rhyme,
But this one doesn't.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
1 - 100 of 1012 matches
Mail list logo