PyCharm Structure窗口中的图标含义

1、在使用pycharm的Structure时可以看到有这些图标在这里插入图片描述
图标上的字母是简写,具体含义如下
在pycharm中是自动补全的变量的类别
p:parameter 参数
m:method 方法
c:class 类

其他的也类似,大同小异
v:variable 变量
f:function 函数

另外,字母左上角有锁的图样子的,表示权限为私有。一般不应改动。

左上角圆圈的含义:
在这里插入图片描述
符号左上方的蓝色气泡表示该符号名以两个下划线开始和结束,由解释器和标准库进行特殊处理。

2、函数和方法的区别

与类和实例无绑定关系的function都属于函数(function);
与类和实例有绑定关系的function都属于方法(method)。


符号含义官方解释

Common

Icon

Description

Python script

Class

Method

Function

Field

Variable

Property

Parameter

Element

Project structure

Directory

Package

Source root

Excluded root

Template roots

Visibility modifiers

private

protected

public

The lock decorator in the upper-left part of a symbol marks a symbol whose name begins with one or more underscores. Such names are considered pseudo-private and are specially treated by an interpreter to restrict their visibility scope.

The blue bubble in the upper-left part of a symbol marks a symbol whose name begins and ends with two underscores, and is specially treated by an interpreter and standard library.

Bookmarks

Anonymous bookmark – a check sign bookmark. Bookmarks are used for quick navigation within a file or across the entire project.

Lettered mnemonic bookmark – a letter in the interval from A to Z.

Numbered mnemonic bookmark – a number in the interval from 0 to 9.

@property语法创建的方法【自己称之为属性方法】,会显示为紫色圆圈上方+向右的箭头。同时,以@方法名.setter对这个属性方法赋值,显示为紫色圆圈上方+向左的箭头。如下图(来自\Lib\site-packages\plotly\graph_objs_scatter3d.py):
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

这里@的用法参见这里

Data Sources

Icon

Description

Access Method

Aggregate

Alias Type

Argument

Body

Check

Cluster

Collation

Collection Type

Column. For more information about column icon combinations, see Possible icon combinations for columns.

Data File

Database

Read-only status

DDL data source

Default

Exception

Extension

External Schema

Foreign Data Wrapper

Foreign Key

Foreign Table

Index

Key

Materialized Log

Materialized View

Object Attribute

Object Type

Operator

Package

Projection

Read-only data sources

Role

Routine

Rule

Scheduled Event

Schema

Sequence

Server

Stored procedure or function

Synonym

Table

Table Type

Tablespace

Trigger

User

User Mapping

Variable

View

Virtual Table

官方解释链接

https://www.jetbrains.com/help/pycharm/symbols.html#file-types

  • 9
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值