Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_posts方法的_classdef.py的Comment_p类的ppid属性返回错了 #114

Closed
mrzhu666 opened this issue Apr 20, 2023 · 4 comments · Fixed by #115
Closed

get_posts方法的_classdef.py的Comment_p类的ppid属性返回错了 #114

mrzhu666 opened this issue Apr 20, 2023 · 4 comments · Fixed by #115
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@mrzhu666
Copy link

Snipaste_2023-04-20_14-01-17

而且为什么每一个方法都要定义自己的返回类?并且都是重复的

@n0099
Copy link

n0099 commented Apr 20, 2023

楼中楼id不应该叫spid(贴吧内部命名)?
ppid疑似unix风格缩写之parent-,然而这样还不如直接把回复贴id叫pid,楼中楼id叫spid(尽管pid spid本质都共享同一个id空间因为回复贴和楼中楼本质完完全全一路人),正如同 #63 (comment)

ef8a8c3#r94765151 进一步指出:

p本就是post的缩写
贴吧泰国第几的en水平指导下的内部命名是

  • 吧forum
  • 主题帖thread
  • 回复贴post
  • 楼中楼subpost(考虑到13年10月才引入楼中楼叫subpost也不奇怪)

让我想起了flarum把主题帖叫discussion,phpbb的主题帖叫topic,而两者的回复贴都叫post
而tbm的命名是:

  • 吧forum
  • 对以下3种帖子的统称post(可以用来命名抽象类)
  • 主题帖thread
  • 回复贴reply
  • 楼中楼subreply

#63 (comment)

居然不是indoor post或者post in post

每一个方法都要定义自己的返回类

可能是为了链式调用

@mrzhu666
Copy link
Author

楼中楼id不应该叫spid(贴吧内部命名)? ppid疑似unix风格缩写之parent-,然而这样还不如直接把回复贴id叫pid,楼中楼id叫spid(尽管pid spid本质都共享同一个id空间因为回复贴和楼中楼本质完完全全一路人),正如同 #63 (comment)

ef8a8c3#r94765151 进一步指出:

p本就是post的缩写
贴吧泰国第几的en水平指导下的内部命名是

  • 吧forum
  • 主题帖thread
  • 回复贴post
  • 楼中楼subpost(考虑到13年10月才引入楼中楼叫subpost也不奇怪)

让我想起了flarum把主题帖叫discussion,phpbb的主题帖叫topic,而两者的回复贴都叫post
而tbm的命名是:

  • 吧forum
  • 对以下3种帖子的统称post(可以用来命名抽象类)
  • 主题帖thread
  • 回复贴reply
  • 楼中楼subreply

#63 (comment)

居然不是indoor post或者post in post

每一个方法都要定义自己的返回类

可能是为了链式调用

这里的ppid等于贴吧的pid,pid等于贴吧的spid。
Comment_p类应该是写错的,get_comments方法的Comment类返回的ppid是正确的。

@lumina37
Copy link
Owner

这个Comment_p.ppid确实是一个复制粘贴导致的bug。定义property是为了让pylance显示注释。至于各种命名,那确实是习惯问题,而我这里主要是因为删帖接口所用的pid并不区分楼中楼和楼层,所以我把更不常用的“所在回复id”命名成了ppid

@n0099
Copy link

n0099 commented Apr 20, 2023

删帖接口所用的pid并不区分楼中楼和楼层

上面说了

尽管pid spid本质都共享同一个id空间因为回复贴和楼中楼本质完完全全一路人

也就是由于13年10月才引入楼中楼所以在贴吧架构师看来楼中楼不过就是特殊的回复贴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants