亲爱的研友该休息了!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人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
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
彭于晏应助hazekurt采纳,获得10
2秒前
王小美完成签到,获得积分10
9秒前
Takina发布了新的文献求助10
13秒前
hwen1998完成签到 ,获得积分10
15秒前
浮游应助科研通管家采纳,获得10
20秒前
27秒前
虚幻心锁发布了新的文献求助10
38秒前
42秒前
追寻绮玉发布了新的文献求助10
48秒前
红橙黄绿蓝靛紫111完成签到,获得积分10
49秒前
郭德久完成签到 ,获得积分0
53秒前
54秒前
56秒前
hazekurt发布了新的文献求助10
1分钟前
1分钟前
1分钟前
木木圆完成签到,获得积分10
1分钟前
injuly完成签到,获得积分10
1分钟前
木木圆发布了新的文献求助10
1分钟前
李健应助木木圆采纳,获得10
1分钟前
1分钟前
追寻绮玉完成签到,获得积分10
2分钟前
虚幻心锁发布了新的文献求助10
2分钟前
小马甲应助科研通管家采纳,获得10
2分钟前
浮游应助科研通管家采纳,获得10
2分钟前
浮游应助科研通管家采纳,获得10
2分钟前
在zz发布了新的文献求助30
2分钟前
Lucas应助allofme采纳,获得10
2分钟前
fsznc完成签到 ,获得积分0
2分钟前
2分钟前
在zz完成签到,获得积分20
2分钟前
allofme发布了新的文献求助10
2分钟前
w_tiger完成签到 ,获得积分10
2分钟前
3分钟前
3分钟前
不吃别夹完成签到,获得积分20
3分钟前
3分钟前
李爱国应助不吃别夹采纳,获得10
3分钟前
JamesPei应助科研通管家采纳,获得10
4分钟前
烟花应助科研通管家采纳,获得10
4分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Manipulating the Mouse Embryo: A Laboratory Manual, Fourth Edition 1000
Determination of the boron concentration in diamond using optical spectroscopy 600
The Netter Collection of Medical Illustrations: Digestive System, Volume 9, Part III - Liver, Biliary Tract, and Pancreas (3rd Edition) 600
Founding Fathers The Shaping of America 500
A new house rat (Mammalia: Rodentia: Muridae) from the Andaman and Nicobar Islands 500
Research Handbook on Law and Political Economy Second Edition 398
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 纳米技术 计算机科学 内科学 化学工程 复合材料 物理化学 基因 催化作用 遗传学 冶金 电极 光电子学
热门帖子
关注 科研通微信公众号,转发送积分 4552949
求助须知:如何正确求助?哪些是违规求助? 3982176
关于积分的说明 12328207
捐赠科研通 3651892
什么是DOI,文献DOI怎么找? 2011442
邀请新用户注册赠送积分活动 1046512
科研通“疑难数据库(出版商)”最低求助积分说明 935061