On 5/19/19 12:28 AM, Arup Rakshit wrote:
>
>> On 19-May-2019, at 4:46 AM, Mark Lawrence wrote:
>>
>> On 18/05/2019 17:21, Arup Rakshit wrote:
>>> I am writing an Flask app following a book, where a piece of python concept
>>> I am not getting how it works. Code is:
>>> class Role(db.Model):
>>>
On 5/19/19, Arup Rakshit wrote:
>
> class Dad:
> def can_i_take_your_car(self):
> print("No...")
>
> class Mom(Dad):
> def can_i_take_your_car(self):
> print("Asking your dad...")
>
> class Victor(Mom, Dad):
> def can_i_take_your_car(self):
> print("Asking mom..
> On 19-May-2019, at 4:46 AM, Mark Lawrence wrote:
>
> On 18/05/2019 17:21, Arup Rakshit wrote:
>> I am writing an Flask app following a book, where a piece of python concept
>> I am not getting how it works. Code is:
>> class Role(db.Model):
>> __tablename__ = 'roles'
>> id = db.Column
On Sat, May 18, 2019 at 09:51:39PM +0530, Arup Rakshit wrote:
> Here, why super(Role, self).__init__(**kwargs) is used instead of
> super().__init__(**kwargs) ? What that Role and self argument is
> instructing the super() ?
The Role and self arguments are the owning class and current instance.
On 18/05/2019 17:21, Arup Rakshit wrote:
I am writing an Flask app following a book, where a piece of python concept I
am not getting how it works. Code is:
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64),
On 18/05/2019 17:21, Arup Rakshit wrote:
> class Role(db.Model):
>
> def __init__(self, **kwargs):
> super(Role, self).__init__(**kwargs)
>
> Here, why super(Role, self).__init__(**kwargs) is used instead
> of super().__init__(**kwargs) ?
I suspect you are reading an older tutoria
I am writing an Flask app following a book, where a piece of python concept I
am not getting how it works. Code is:
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
default = db.Column(db.Boolea