美文网首页
Python - super | 幂等 | 跳转&重定向

Python - super | 幂等 | 跳转&重定向

作者: 姚屹晨 | 来源:发表于2017-10-14 20:00 被阅读21次

1.super

  • super(cls,inst)获得是clsMRO(Method Resolution Order)列表中的下一个类(+1)

2.什么是幂等?

  • 在相同的数据和参数下,执行一次或多次产生的效果是一样的。

3.GNOME:GNU Network Object Model Environment

4.跳转和重定向
①跳转是什么(301)?

  • 为了保证用户的访问,将旧网址在废弃前转向新网址,旧网址大多数情况下会永久性移走。

②重定向是什么(302)?

  • 表示页面只是暂时性被转移。

UNDERSTANDING SELF AND INIT METHOD IN PYTHON CLASS.

①Object is one of instances of the class,which can perform the functionalities which are defined in the class.

②self represents the instance of the class.By using the self keyword we can access the attributes and methods of the class in python.

__init__ is a reserved method in python classed.lt is known as a constructor in object oriented concepts.This method called when an object is created from the class and it allow the class to initialize the attributes of a class.

④Usage of "self" in class to access the methods and attributes.

need_for_speed.png rectangle.png

6.mysql
①如何创建一个数据库?

  • create database GradeManager;

②如何切换到该数据库?

  • use GradeManager;

③如何修改一个表中的字段的长度?

修改字段的长度.png

④查询表中的数据

查询表中的数据.png

⑤增加和删除表中的一个字段

增加和删除表中的字段.png

⑥向表中插入一条记录

向表中插入一条记录.png

⑦删除Grade表中课程编号为1的记录。

删除Grade表中课程编号为1的记录.png

相关文章

网友评论

      本文标题:Python - super | 幂等 | 跳转&重定向

      本文链接:https://www.haomeiwen.com/subject/nbefuxtx.html