Ryu
  • πŸ‘©πŸ»β€πŸ’» Ryu / software_engineer
  • ✨Resume
  • Python3
    • Python3 κ°€μƒν™˜κ²½ μ„€μ •ν•˜κΈ°
      • Python3 vs Python2
      • Pyenv
      • Venv
      • Pip
    • Flask
      • Flask μ„€μΉ˜ν•˜κΈ°
      • API Server λ§Œλ“€κΈ°
    • REST API
    • Command Line ν™œμš©ν•˜κΈ°
    • Module μ‚¬μš©ν•˜κΈ°
      • Pickle - μžλ£Œν˜•μ„ 파일둜 μ €μž₯ν•  λ•Œ
    • MongoDB connection
      • Pymongo
    • WSGI
      • πŸ’‘WSGI κ°€ ν•„μš”ν•œ 이유
      • Web Server / WSGI / Middleware / Application ꡬ쑰
      • WSGI Middleware μ’…λ₯˜
      • Gunicorn
        • Gunicorn vs Uwsgi
    • Dockerize
      • πŸ’‘Dockerize κ°€ ν•„μš”ν•œ 이유
      • 1. Create Dockerfile
        • Gunicorn 으둜 nginx 와 app μ—°κ²°ν•˜κΈ°
    • Kubernetes 둜 λ°°ν¬ν•˜κΈ°
      • πŸ’‘Kubernetes κ°€ ν•„μš”ν•œ 이유
      • Helm μ‚¬μš©ν•˜κΈ°
      • Helm 으둜 k8s 에 μ•± λ°°ν¬ν•˜κΈ°
  • Open Tracing (정리쀑)
    • Open Tracing μ΄λž€ 무엇인가
    • Python OpenTracing Example
    • Jaeger, Jaeger UI
    • Python Jaeger Tutorial
    • Zipkin μ•Œμ•„λ³΄κΈ°
    • Jaeger-client λ¦¬μŠ€νŒ…
  • Microservice Architecture
    • Netflix의 MSA 컨셉
      • ⚑️ MSA λ₯Ό λ„μž…ν• λ•Œ κ³ λ €ν•΄μ•Όν•  점듀
  • Paper
    • Dynamo: Amazon’s Highly Available Key-value Store
      • 1. Introduction
      • 2. Background
      • 3. Related Work
        • Related Paper) Pastry, Chord
        • Byzantine Fault Tolerance
      • 4. System Architecture
        • 4.1 System Interface
        • 4.2 Partitioning
        • 4.3 Replication
        • Hash Function
  • Frontend
    • CommonJS 와 AMD
    • RequireJS
    • WebSocket
      • WebSocket vs Socket.io
      • polling vs long polling vs streaming
    • Vue.js
      • Vue.js μ—μ„œ WebSocket μ‚¬μš©ν•˜κΈ°
      • [ν”„λ‘œμ νŠΈ] Vue, Vuex, AntDesignVue 둜 운영툴 λ§Œλ“€κΈ°
    • React x Redux 둜 ν”„λ‘œμ νŠΈ λ§Œλ“€κΈ°
      • 0. React, Redux λ₯Ό μ„ νƒν•œ 이유
      • 1. ν”„λ‘œμ νŠΈ μƒμ„±ν•˜κ³  Webpack4 μ μš©ν•˜κΈ°
      • 2. React 와 ReactDOM μ μš©ν•˜κΈ°
      • 3. Material UI μ μš©ν•˜κΈ°
  • Data Engineering
    • Spark
      • Spark μ΄λž€?
      • 각 데λͺ¬μ˜ μ—­ν•  Driver, Master, Worker
      • μž₯단점 / ν•¨κ»˜μ‚¬μš©ν•˜λŠ” 툴 / μ‚¬μš© 사둀
  • Service Mesh (정리쀑)
    • RPC
    • gRPC - Python Server λ§Œλ“€κΈ°
      • step 2.
Powered by GitBook
On this page
  • Python3 μž₯점 πŸ’Ž
  • Python2 vs Python3

Was this helpful?

  1. Python3
  2. Python3 κ°€μƒν™˜κ²½ μ„€μ •ν•˜κΈ°

Python3 vs Python2

Python3 은 Python2.x λΌμΈκ³ΌλŠ” 양립할 수 μ—†κΈ° λ•Œλ¬Έμ— Python3 만의 νŠΉμ§•μ„ μ•Œμ•„μ•Όν•©λ‹ˆλ‹€.

Python3 μž₯점 πŸ’Ž

VirtualEnv λ‚΄μž₯

  • Python2 μ—μ„œλŠ” ν”„λ‘œμ νŠΈλ³„ κ°€μƒν™˜κ²½ μ…‹νŒ…μ„ μœ„ν•΄ VirtualEnv λ₯Ό μ‚¬μš©ν•˜λ €κ³  ν• λ•Œ, λ¨Όμ € pip 을 ν†΅ν•˜μ—¬ νŒ¨ν‚€μ§€λ₯Ό μ„€μΉ˜ν•΄μ•Όλ§Œ ν–ˆμŠ΅λ‹ˆλ‹€.

  • ν•˜μ§€λ§Œ Python3 μ—μ„œλŠ” VirtualEnv κ°€ λ‚΄μž₯λ˜μ–΄ 있기 λ•Œλ¬Έμ— pyenv λͺ…λ Ήμ–΄λ§ŒμœΌλ‘œ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

Unicode 지원

  • Python2 의 κΈ°λ³Έ 인코딩이 Ascii 이닀 λ³΄λ‹ˆ, μŠ€ν¬λ¦½νŠΈμ—μ„œ ν•œκΈ€μ„ μ‚¬μš©ν•˜κ²Œ 되면 SyntaxError κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.

  • Python3 μ—μ„œλŠ” μœ λ‹ˆμ½”λ“œκ°€ ν¬ν•¨λœ String 은 λͺ¨λ‘ μœ λ‹ˆμ½”λ“œλ‘œ μ €μž₯ν•˜κΈ° λ•Œλ¬Έμ— μŠ€ν¬λ¦½νŠΈμƒμ—μ„œ ν•œκΈ€μ„ μ‚¬μš©ν•˜κΈ° νŽΈλ¦¬ν•©λ‹ˆλ‹€.

μƒμ„Έν•œ Error Exception

  • Python3 μ—μ„œλŠ” μ˜ˆμ™Έκ°€ λ°œμƒν–ˆμ„λ•Œ μ•Œλ €μ£ΌλŠ” μ—λŸ¬ λ©”μ„Έμ§€κ°€ μƒμ„Έν•©λ‹ˆλ‹€.

  • νŠΉμ • μ˜ˆμ™Έλ₯Ό λ°›μ•„ 또 λ‹€λ₯Έ μ˜ˆμ™Έλ₯Ό λ°œμƒμ‹œν‚¬λ•Œ, κ·Έ 과정을 더 μƒμ„Ένžˆ μ•Œλ €μ€λ‹ˆλ‹€.

Python2 vs Python3

μ‹€μ œλ‘œ Python3 코딩을 ν•˜λ©΄μ„œ Python2 와 문법이 λ‹¬λΌμ„œ λ‹Ήν™©ν–ˆλ˜ 뢀뢄듀을 μ •λ¦¬ν•΄λ³΄μ•˜μŠ΅λ‹ˆλ‹€.

print vs print ("")

  • Python2

print "python2"
  • Python3

print ("python3")

xrange vs range

  • Python2 κ°€ μ œκ³΅ν•˜λ˜ xrange λ₯Ό μ‚¬μš©ν•˜λ©΄ 데이터 크기와 상관없이 Memory ν• λ‹ΉλŸ‰μ„ λ™μΌν•˜κ²Œ μœ μ§€ν•˜μ—¬ Memory νš¨μœ¨μ„ 높일 수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.

  • ν•˜μ§€λ§Œ Python3 μ—μ„œλŠ” 더이상 xrange λ₯Ό μ§€μ›ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 무쑰건 range 만 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

μ°Έκ³ : Python 곡식 μ‚¬μ΄νŠΈ

PreviousPython3 κ°€μƒν™˜κ²½ μ„€μ •ν•˜κΈ°NextPyenv

Last updated 6 years ago

Was this helpful?