On Fri, Jan 4, 2019 at 7:54 PM Ian Kelly <ian.g.ke...@gmail.com> wrote:
>
> On Fri, Jan 4, 2019 at 1:20 AM Chris Angelico <ros...@gmail.com> wrote:
> > > Pep484 is too complex. Typle should not a seperate type, in fact it 
> > > should be just a class. Like this in other programming language
> > > Python: Tuple(id: int, name: string, age: int)
> > > Other: class someClass {
> > >         public int id;
> > >         public string name;
> > >         public int age;
> > > }
> >
> > In other words, you want typing to be as restrictive as it is in C++
> > or Java. How would you define the type "JSON-encodable"? You can
> > encode a string, an integer, a float, an array of JSON-encodable
> > objects, and a mapping from strings to JSON-encodable objects. Can you
> > represent that as a class?
>
> I'm not sure the OP is saying that at all. It kind of sounds like he
> thinks that tuples are Python's version of classes, which is pretty
> hilarious.

Ohhhh. And here I thought that *closures* were Python's version of C++
classes. My bad.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to