Re: [BangPypers] Any python metaclasses for UID

2009-07-30 Thread Noufal Ibrahim
On Thu, Jul 30, 2009 at 8:18 AM, Roshan Mathewsrmath...@gmail.com wrote:
[..]
 Something which Noufal seemed to pull out of thin
 air.

Someone had to do it.

-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Rajeev J Sebastian
On Wed, Jul 29, 2009 at 12:58 PM, Shivaraj M Sshivraj...@gmail.com wrote:
 A small typo there
 super(UID,self).Wind(7)  is super(ClassI,self).Wind(7)
 Well google's is doing definitely a strong attempt here. I guess it's
 metaprogramming than metaclassing.
 Class GoogleOS(OS):
          def __init__(self):
                self.official.languages = ['c++','java','python']
                self.name = 'Chrome'
          def os(self,Browser(Webapps)):
                self.aim.compatibility = Gates().Wind(7).os.compatibility +
 Mac().os.compatibility
                self.patches = tobe decided
 where Gates is extended by Boost for seamless interoperability.
 I haven't got any more ideas on this.
 Well about the useful part of the search I think Data Snooping Bias should
 be avoidedl.

I have a good feeling that Shivaraj is a spambot :P

Regards
Rajeev j Sebastian
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Noufal Ibrahim
On Wed, Jul 29, 2009 at 12:58 PM, Shivaraj M Sshivraj...@gmail.com wrote:
 A small typo there

But an important one.

 super(UID,self).Wind(7)  is super(ClassI,self).Wind(7)
 Well google's is doing definitely a strong attempt here. I guess it's
 metaprogramming than metaclassing.

Nonsense. It's simple method dispatching.

 Class GoogleOS(OS):
          def __init__(self):
                self.official.languages = ['c++','java','python']
                self.name = 'Chrome'
          def os(self,Browser(Webapps)):
                self.aim.compatibility = Gates().Wind(7).os.compatibility +
 Mac().os.compatibility
                self.patches = tobe decided
 where Gates is extended by Boost for seamless interoperability.

Not really. You're reinstantiating Boost using the Gates provider
which won't work in this context.

 I haven't got any more ideas on this.

Why don't you try to converting Gates to a factory? That might help
you out rather than the one way UIDs.

 Well about the useful part of the search I think Data Snooping Bias should
 be avoidedl.

Don't knock it till you've tried it. I'm sure you'll get far with that
query. Also try frobnicating the bogosphere.

-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Roshan Mathews
I think I just fell down the rabbit hole.

On Wed, Jul 29, 2009 at 10:17 PM, Noufal Ibrahimnou...@gmail.com wrote:
 On Wed, Jul 29, 2009 at 12:58 PM, Shivaraj M Sshivraj...@gmail.com wrote:
 A small typo there

 But an important one.

 super(UID,self).Wind(7)  is super(ClassI,self).Wind(7)
 Well google's is doing definitely a strong attempt here. I guess it's
 metaprogramming than metaclassing.

 Nonsense. It's simple method dispatching.

 Class GoogleOS(OS):
          def __init__(self):
                self.official.languages = ['c++','java','python']
                self.name = 'Chrome'
          def os(self,Browser(Webapps)):
                self.aim.compatibility = Gates().Wind(7).os.compatibility +
 Mac().os.compatibility
                self.patches = tobe decided
 where Gates is extended by Boost for seamless interoperability.

 Not really. You're reinstantiating Boost using the Gates provider
 which won't work in this context.

 I haven't got any more ideas on this.

 Why don't you try to converting Gates to a factory? That might help
 you out rather than the one way UIDs.

 Well about the useful part of the search I think Data Snooping Bias should
 be avoidedl.

 Don't knock it till you've tried it. I'm sure you'll get far with that
 query. Also try frobnicating the bogosphere.

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Gora Mohanty
On Wed, 29 Jul 2009 23:26:17 +0530
Noufal Ibrahim nou...@gmail.com wrote:

 On Wed, Jul 29, 2009 at 10:20 PM, Roshan
 Mathewsrmath...@gmail.com wrote:
  I think I just fell down the rabbit hole.
 
 
 The time has come the Walrus said to speak of many things!

Of atoms, and stars, and nebulae,
Of entropy, and genes!

Regards,
Gora
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Baishampayan Ghose
 I think I just fell down the rabbit hole.

I think BangPypers just got its own John Harrop.

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Baishampayan Ghose
I didn't call _you_ Jo[h]n Harrop, man :) I called the OP a troll
because his question is pretty much meaningless and is causing
unnecessary irritation.

May be it was because of the way I quoted the mail. Sorry for the confusion :-p

Regards,
BG

On 7/30/09, Roshan Mathews rmath...@gmail.com wrote:
 On Thu, Jul 30, 2009 at 1:43 AM, Baishampayan Ghoseb.gh...@gmail.com
 wrote:
 I think I just fell down the rabbit hole.

 I think BangPypers just got its own John Harrop.

 Jon, I think you mean (although there is a John Harrop in the Clojure
 community), in which case I'm guessing you're trying hard to say I'm
 trolling (like the JH in comp.lang.lisp) ... except I wasn't, I just
 wanted context.  Something which Noufal seemed to pull out of thin
 air.

 Roshan
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers


-- 
Sent from my mobile device

Baishampayan Ghose
b.ghose at gmail.com
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Kenneth Gonsalves
On Thursday 30 Jul 2009 9:31:40 am Baishampayan Ghose wrote:
 May be it was because of the way I quoted the mail. Sorry for the confusion
 :-p

top posting almost invariably causes confusion - an excellent way of making 
sure no one knows what you are talking about
-- 
regards
Kenneth Gonsalves
Associate
NRC-FOSS
http://nrcfosshelpline.in/web/
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Roshan Mathews
On Thu, Jul 30, 2009 at 9:31 AM, Baishampayan Ghoseb.gh...@gmail.com wrote:
 I didn't call _you_ Jo[h]n Harrop, man :) I called the OP a troll
 because his question is pretty much meaningless and is causing
 unnecessary irritation.

 May be it was because of the way I quoted the mail. Sorry for the confusion 
 :-p

Ah, no biggie.   Like KG says, I shouldn't have top posted. :)

Roshan
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-29 Thread Baishampayan Ghose
 May be it was because of the way I quoted the mail. Sorry for the confusion
 :-p

 top posting almost invariably causes confusion - an excellent way of making
 sure no one knows what you are talking about

Hehe :) I for one merely wanted to add to Roshan's sentiment by
drawing an analogy with the usual way in which Jon Harrop traumatises
different mailing lists.

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-28 Thread Rajeev J Sebastian
On Tue, Jul 28, 2009 at 7:28 PM, Shivaraj M Sshivraj...@gmail.com wrote:
 Well,it's like a game.
 Mapping the names with real world objects-specially current affairs, should
 convey great deal of information
 for the abstraction to be realized.
 Still waiting for the metaclasses, if any.
 --

Do you have any URLs that describe what UID actually is ?

googling doesnt return anything useful ...

Regards
Rajeev J Sebastian
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-27 Thread Shivaraj M S
We will have to wait for UID I guess.
In a ''real world scenario''

class ClassI(Gates):
def __init__():
  super(UID,self).Wind(7)
friend void exchange(ClassI x, Gates y)

void exchange(A x, B y)
{
 B.x = A.location.awards
 A.x = B.location.banks.outsource
}

These classes extended from probably c++ or so (of whose patchy source is
closed) .

Now the issue is this class has also a friend in UID but can be extended by
python in real world.

class UID():
friend void A::show(ClassI x, UID y);

UID is meant to be in public domain of whose behaviour is unknown. Should be
available near future Py 3.0
Coming back to the question:
Can there be a metaclass in python which can change the behaviour of object
at creation stage by extending it and nullifying friend functions?

-- 
Regards
___
Shivaraj
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-27 Thread Sirtaj Singh Kang


On 27-Jul-09, at 1:50 PM, Shivaraj M S wrote:
[snip]


Can there be a metaclass in python which can change the behaviour of  
object at creation stage by extending it and nullifying friend  
functions?


(I must confess this is the only sentence in the email that I could  
comprehend...)


If what you are looking for is a way to customize object creation,  
have a look at the __new__ class method. It is called before __init__,  
and can return _any_ object when the client code attempts to  
instantiate the class.


In some cases I have dynamically generated a subclass of the class  
using type(), and returned a new instance of that. I think this is the  
kind of thing you are looking for.


-Taj.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Any python metaclasses for UID

2009-07-27 Thread Senthil Kumaran
On Mon, Jul 27, 2009 at 02:50:39PM +0530, Sirtaj Singh Kang wrote:

 On 27-Jul-09, at 1:50 PM, Shivaraj M S wrote:
 [snip]

 Can there be a metaclass in python which can change the behaviour of  
 object at creation stage by extending it and nullifying friend  
 functions?

 (I must confess this is the only sentence in the email that I could  
 comprehend...)

Very true.
 
Shivaraj: It is nearly incomprehensible as what you are trying to
convey. If you are a beginning python programmer (but a good other
language programmer), a couple of tutorials at www.python.org may
help perhaps?


-- 
Senthil
Needs are a function of what other people have.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers