Giter Site home page Giter Site logo

Comments (3)

JIMhackKING avatar JIMhackKING commented on May 27, 2024

ua.strip() 是用来去除字符串前后的空格或者制表符,就是空的地方就去除掉,只留下有字符的地方,[1:-1 - 1] ……这个就有点奇怪了,其实就是 [1:-2] ,这个是 Python 的切片,意思就是提取列表中 第2个数据(索引为1)到倒数第二个数据(不包括倒数第二个),之后返回一个新列表。
个人感觉,开发者的代码结构很混乱,而且没有注释,没有任何关于代码的解释

from bilibili-user.

airingursb avatar airingursb commented on May 27, 2024

确实是有问题的,此行代码的出处是由 @cloudsere 同学贡献的重构代码:05e7ed8

此处估计是她写错了,多了一个-1,后来被 @adlinx 发现了问题:05e7ed8

但是他修改的不对,虽然避免了之前多出一个-1的 bug,但是语义有问题。

感谢提出,已修复。
也感谢两位同学贡献的代码。

from bilibili-user.

airingursb avatar airingursb commented on May 27, 2024

#41

from bilibili-user.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.