René's URL Explorer Experiment


Title: Code refactoring, to make the library more Pythonic and nicer to use by rshk · Pull Request #32 · ahupp/python-magic · GitHub

Open Graph Title: Code refactoring, to make the library more Pythonic and nicer to use by rshk · Pull Request #32 · ahupp/python-magic

X Title: Code refactoring, to make the library more Pythonic and nicer to use by rshk · Pull Request #32 · ahupp/python-magic

Description: A python wrapper for libmagic. Contribute to ahupp/python-magic development by creating an account on GitHub.

Open Graph Description: Have a look at the code and let me know what do you think.. It looks way cleaner to me this way (and of course tests are up & running on 2.6, 2.7, 3.1, 3.2 and 3.3), while keeping retro-compati...

X Description: Have a look at the code and let me know what do you think.. It looks way cleaner to me this way (and of course tests are up & running on 2.6, 2.7, 3.1, 3.2 and 3.3), while keeping retro-com...

Opengraph URL: https://github.com/ahupp/python-magic/pull/32

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:3840a594-e000-60ee-5ce6-5d51b2fa1332
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA8BE:52D98:41930E:5B0B77:6A586BBA
html-safe-nonce892aaba7683f65fac1b514b46b9f517b6072ba4f62ec2fa8f900209963f90ae8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEJFOjUyRDk4OjQxOTMwRTo1QjBCNzc6NkE1ODZCQkEiLCJ2aXNpdG9yX2lkIjoiMzA0MTkxNzEwMDM0NjYwMDM3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac12cda187c1d7535528e2715cce084a5621ed093819aeb7c0bfce97b9bc10a292
hovercard-subject-tagpull_request:5481044
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/ahupp/python-magic/32/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/79253e45709f4878dcc5f4e445804329959c16e019a0f7544ef102643bd9ec67/ahupp/python-magic/pull/32
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/79253e45709f4878dcc5f4e445804329959c16e019a0f7544ef102643bd9ec67/ahupp/python-magic/pull/32
og:image:altHave a look at the code and let me know what do you think.. It looks way cleaner to me this way (and of course tests are up & running on 2.6, 2.7, 3.1, 3.2 and 3.3), while keeping retro-compati...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamershk
hostnamegithub.com
expected-hostnamegithub.com
None5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6
turbo-cache-controlno-cache
go-importgithub.com/ahupp/python-magic git https://github.com/ahupp/python-magic.git
octolytics-dimension-user_id40594
octolytics-dimension-user_loginahupp
octolytics-dimension-repository_id589189
octolytics-dimension-repository_nwoahupp/python-magic
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id589189
octolytics-dimension-repository_network_root_nwoahupp/python-magic
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ahupp/python-magic/pull/32#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fahupp%2Fpython-magic%2Fpull%2F32
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fahupp%2Fpython-magic%2Fpull%2F32
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=ahupp%2Fpython-magic
Reloadhttps://github.com/ahupp/python-magic/pull/32
Reloadhttps://github.com/ahupp/python-magic/pull/32
Reloadhttps://github.com/ahupp/python-magic/pull/32
ahupp https://github.com/ahupp
python-magichttps://github.com/ahupp/python-magic
Notifications https://github.com/login?return_to=%2Fahupp%2Fpython-magic
Fork 304 https://github.com/login?return_to=%2Fahupp%2Fpython-magic
Star 2.9k https://github.com/login?return_to=%2Fahupp%2Fpython-magic
Code https://github.com/ahupp/python-magic
Issues 24 https://github.com/ahupp/python-magic/issues
Pull requests 4 https://github.com/ahupp/python-magic/pulls
Actions https://github.com/ahupp/python-magic/actions
Projects https://github.com/ahupp/python-magic/projects
Wiki https://github.com/ahupp/python-magic/wiki
Security and quality 0 https://github.com/ahupp/python-magic/security
Insights https://github.com/ahupp/python-magic/pulse
Code https://github.com/ahupp/python-magic
Issues https://github.com/ahupp/python-magic/issues
Pull requests https://github.com/ahupp/python-magic/pulls
Actions https://github.com/ahupp/python-magic/actions
Projects https://github.com/ahupp/python-magic/projects
Wiki https://github.com/ahupp/python-magic/wiki
Security and quality https://github.com/ahupp/python-magic/security
Insights https://github.com/ahupp/python-magic/pulse
rshkhttps://github.com/rshk
ahupp:masterhttps://github.com/ahupp/python-magic/tree/master
rshk:masterhttps://github.com/rshk/python-magic/tree/master
Conversationhttps://github.com/ahupp/python-magic/pull/32
Commits19 (19)https://github.com/ahupp/python-magic/pull/32/commits
Checkshttps://github.com/ahupp/python-magic/pull/32/checks
Files changedhttps://github.com/ahupp/python-magic/pull/32/files
Code refactoring, to make the library more Pythonic and nicer to usehttps://github.com/ahupp/python-magic/pull/32#top
rshkhttps://github.com/rshk
ahupp:masterhttps://github.com/ahupp/python-magic/tree/master
rshk:masterhttps://github.com/rshk/python-magic/tree/master
https://github.com/rshk
rshkhttps://github.com/rshk
May 1, 2013https://github.com/ahupp/python-magic/pull/32#issue-13868779
Please reload this pagehttps://github.com/ahupp/python-magic/pull/32
rshkhttps://github.com/rshk
March 28, 2013 07:35https://github.com/ahupp/python-magic/pull/32#commits-pushed-82cc034
https://github.com/rshk
Proposed library refactoringhttps://github.com/ahupp/python-magic/pull/32/commits/82cc0346d3279b885c70a3c07f6c83595ac851a4
82cc034https://github.com/ahupp/python-magic/pull/32/commits/82cc0346d3279b885c70a3c07f6c83595ac851a4
https://github.com/rshk
Fixed flags constants, to reflect the ones in magic.hhttps://github.com/ahupp/python-magic/pull/32/commits/f5f0680d0cad3a5b1f4d248a3b41fdfc4bd75331
f5f0680https://github.com/ahupp/python-magic/pull/32/commits/f5f0680d0cad3a5b1f4d248a3b41fdfc4bd75331
https://github.com/rshk
New test caseshttps://github.com/ahupp/python-magic/pull/32/commits/c224ecbfda0f7aa56bc945182a8e788d87c30bf3
c224ecbhttps://github.com/ahupp/python-magic/pull/32/commits/c224ecbfda0f7aa56bc945182a8e788d87c30bf3
https://github.com/rshk
Simple Is Better[TM]!https://github.com/ahupp/python-magic/pull/32/commits/12e7e0db4b33c7ac16d46ec916154068f46dfd40
12e7e0dhttps://github.com/ahupp/python-magic/pull/32/commits/12e7e0db4b33c7ac16d46ec916154068f46dfd40
https://github.com/rshk
Improved readmehttps://github.com/ahupp/python-magic/pull/32/commits/7d71fb9c63c8ce9029ef86c590c09e1f29571932
7d71fb9https://github.com/ahupp/python-magic/pull/32/commits/7d71fb9c63c8ce9029ef86c590c09e1f29571932
https://github.com/rshk
Now loading the right class :)https://github.com/ahupp/python-magic/pull/32/commits/d6ace4c4a614e94ce01a7acbd0b47ba7f208bdca
d6ace4chttps://github.com/ahupp/python-magic/pull/32/commits/d6ace4c4a614e94ce01a7acbd0b47ba7f208bdca
https://github.com/rshk
Unittests for the Pythonic libraryhttps://github.com/ahupp/python-magic/pull/32/commits/7a1caa9a0e2dbe27b3905bf21c5a59cce5fce064
7a1caa9https://github.com/ahupp/python-magic/pull/32/commits/7a1caa9a0e2dbe27b3905bf21c5a59cce5fce064
https://github.com/rshk
Cleanuphttps://github.com/ahupp/python-magic/pull/32/commits/a34fe3a91e69ef90e1fd5292d9de00482ca86915
a34fe3ahttps://github.com/ahupp/python-magic/pull/32/commits/a34fe3a91e69ef90e1fd5292d9de00482ca86915
https://github.com/rshk
Added test suite to setup.pyhttps://github.com/ahupp/python-magic/pull/32/commits/2ef7d239670c1863b781cd23913ceb1a4101a0fe
2ef7d23https://github.com/ahupp/python-magic/pull/32/commits/2ef7d239670c1863b781cd23913ceb1a4101a0fe
https://github.com/rshk
Fixed code formattinghttps://github.com/ahupp/python-magic/pull/32/commits/433400381cb7471aeb8a2ae824c85cd0ced701dc
4334003https://github.com/ahupp/python-magic/pull/32/commits/433400381cb7471aeb8a2ae824c85cd0ced701dc
https://github.com/rshk
fixed typohttps://github.com/ahupp/python-magic/pull/32/commits/7d39f731b9d87de4ca198bdd643cae0793c3984e
7d39f73https://github.com/ahupp/python-magic/pull/32/commits/7d39f731b9d87de4ca198bdd643cae0793c3984e
https://github.com/rshk
Work to make the library (hopefully) retro-compatiblehttps://github.com/ahupp/python-magic/pull/32/commits/4b64664552597925662c93fd91444acaf48127e5
4b64664https://github.com/ahupp/python-magic/pull/32/commits/4b64664552597925662c93fd91444acaf48127e5
https://github.com/rshk
Some fixes to make tests run on Python 3.3https://github.com/ahupp/python-magic/pull/32/commits/628a0702768ac0b1a41107d8aed283bb25aa94f9
628a070https://github.com/ahupp/python-magic/pull/32/commits/628a0702768ac0b1a41107d8aed283bb25aa94f9
https://github.com/rshk
Added compatibility informationhttps://github.com/ahupp/python-magic/pull/32/commits/9cef7da1263b36ab326769852c755170313a81a1
9cef7dahttps://github.com/ahupp/python-magic/pull/32/commits/9cef7da1263b36ab326769852c755170313a81a1
https://github.com/rshk
Added .travis.ymlhttps://github.com/ahupp/python-magic/pull/32/commits/6efd089ad88ed21bd84b4b5c2ee10506fbb31ffd
6efd089https://github.com/ahupp/python-magic/pull/32/commits/6efd089ad88ed21bd84b4b5c2ee10506fbb31ffd
https://github.com/rshk
Added Travis Build statushttps://github.com/ahupp/python-magic/pull/32/commits/7a16963baa3a8e3b7ccde467981ac81df874062f
7a16963https://github.com/ahupp/python-magic/pull/32/commits/7a16963baa3a8e3b7ccde467981ac81df874062f
https://github.com/rshk
Now testing for 3.1 and 3.2 toohttps://github.com/ahupp/python-magic/pull/32/commits/571408f8285cc230ea0208cfa840d07b45cb4cf5
571408fhttps://github.com/ahupp/python-magic/pull/32/commits/571408f8285cc230ea0208cfa840d07b45cb4cf5
https://github.com/rshk
Now ignoring virtualenvs toohttps://github.com/ahupp/python-magic/pull/32/commits/9795bf04509e1af2892582cd008de10ad9bc4a01
9795bf0https://github.com/ahupp/python-magic/pull/32/commits/9795bf04509e1af2892582cd008de10ad9bc4a01
https://github.com/rshk
Python 3.1 seems not to be supported by travishttps://github.com/ahupp/python-magic/pull/32/commits/4cb74d11f229a6d35be803f10d2a7ab74bc72f45
4cb74d1https://github.com/ahupp/python-magic/pull/32/commits/4cb74d11f229a6d35be803f10d2a7ab74bc72f45
https://github.com/ahupp
ahupphttps://github.com/ahupp
Sep 27, 2013https://github.com/ahupp/python-magic/pull/32#issuecomment-25264799
Please reload this pagehttps://github.com/ahupp/python-magic/pull/32
https://github.com/ahupp
ahupphttps://github.com/ahupp
Sep 27, 2013https://github.com/ahupp/python-magic/pull/32#event-67610001
https://github.co/hiddenchars
https://github.com/ahupp/python-magic/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fahupp%2Fpython-magic%2Fpull%2F32
Please reload this pagehttps://github.com/ahupp/python-magic/pull/32
https://github.com/rshk
https://github.com/ahupp
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.