亲爱的研友该休息了!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您度过漫漫科研夜!身体可是革命的本钱,早点休息,好梦!

RIdiom: Automatically Refactoring Non-Idiomatic Python Code with Pythonic Idioms

重构代码 Python(编程语言) 计算机科学 程序设计语言 插件 源代码 软件工程 软件
作者
Zejun Zhang,Zhenchang Xing,Xiwei Xu,Liming Zhu
标识
DOI:10.1109/icse-companion58688.2023.00034
摘要

Pythonic idioms are widely adopted in the Python community because of their advantages such as conciseness and performance. However, when Python programmers use pythonic idioms, they face many challenges such as being unaware of certain pythonic idioms or not knowing how to use them properly. Based on an analysis of 7,638 Python repositories on GitHub, we find that non-idiomatic Python code that can be refactored with pythonic idioms occurs frequently and widely. Unfortunately, there is no tool to automatically refactor such non-idiomatic code into idiomatic code. In this paper, we design and implement a tool called RIdiom to make Python code idiomatic with nine pythonic idioms. Python developers can not only refactor projects easily via a visual interface of the PyCharm plugin but also can refactor projects using the command line without relying on an integrated development environment. We test and review over 4,115 refactorings applied to 1,065 Python projects from GitHub, and submit 90 pull requests for the 90 randomly sampled refactorings to 84 projects. These evaluations confirm the high-accuracy, practicality and usefulness of our refactoring tool on real-world Python code. Demo Tool: https://github.com/idiomaticrefactoring/RIdiom Demo Video: https://youtu.be/KG-nXGR8DIA

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
1秒前
兔子完成签到,获得积分10
3秒前
5秒前
6秒前
10秒前
morethanlee发布了新的文献求助30
11秒前
jie发布了新的文献求助10
13秒前
白小超人完成签到 ,获得积分10
20秒前
小蘑菇应助aaaaa888888888采纳,获得10
24秒前
molihuakai应助jie采纳,获得10
25秒前
33秒前
drhkc完成签到,获得积分10
35秒前
董子钰完成签到 ,获得积分10
41秒前
燕燕完成签到,获得积分10
46秒前
46秒前
51秒前
1分钟前
1分钟前
2分钟前
2分钟前
2分钟前
田様应助科研通管家采纳,获得10
2分钟前
2分钟前
Timmy完成签到,获得积分10
3分钟前
3分钟前
3分钟前
酷炫白筠发布了新的文献求助10
3分钟前
Abdurrahman完成签到,获得积分10
3分钟前
3分钟前
3分钟前
酷炫白筠完成签到,获得积分10
3分钟前
jie发布了新的文献求助10
3分钟前
4分钟前
ding应助aaaaa888888888采纳,获得10
4分钟前
4分钟前
小蘑菇应助科研通管家采纳,获得10
4分钟前
4分钟前
4分钟前
Adc发布了新的文献求助10
4分钟前
5分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
The Cambridge History of China: Volume 4, Sui and T'ang China, 589–906 AD, Part Two 1500
Cowries - A Guide to the Gastropod Family Cypraeidae 1200
Quality by Design - An Indispensable Approach to Accelerate Biopharmaceutical Product Development 800
Pulse width control of a 3-phase inverter with non sinusoidal phase voltages 777
Signals, Systems, and Signal Processing 610
Research Methods for Applied Linguistics: A Practical Guide 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6399261
求助须知:如何正确求助?哪些是违规求助? 8215044
关于积分的说明 17407538
捐赠科研通 5452582
什么是DOI,文献DOI怎么找? 2881820
邀请新用户注册赠送积分活动 1858293
关于科研通互助平台的介绍 1700300